List of usage examples for com.mongodb.client MongoCollection dropIndex
void dropIndex(Bson keys);
From source file:io.djigger.collector.accessors.stackref.AbstractAccessor.java
License:Open Source License
private void dropIndex(MongoCollection<Document> collection, Document ttlIndex) { collection.dropIndex(ttlIndex.getString("name")); }
From source file:uk.ac.ebi.eva.dbmigration.mongodb.ExtractAnnotationFromVariant.java
License:Apache License
@ChangeSet(order = "002", id = "dropIndexes", author = "EVA") public void dropIndexes(MongoDatabase mongoDatabase) { final MongoCollection<Document> variantsCollection = mongoDatabase .getCollection(databaseParameters.getDbCollectionsVariantsName()); logger.info("2) drop indexes from annot field from collection {}", variantsCollection.getNamespace()); variantsCollection.dropIndex(LEGACY_ANNOTATION_CT_SO_INDEX); variantsCollection.dropIndex(LEGACY_ANNOTATION_XREF_ID_INDEX); }