DropIndexOperation dropIndex(final String indexName, final DropIndexOptions dropIndexOptions) { return new DropIndexOperation(namespace, indexName, writeConcern) .maxTime(dropIndexOptions.getMaxTime(MILLISECONDS), MILLISECONDS); }
/** * Drops the index with the given name from this collection. * * @param indexName name of index to drop * @throws MongoException if the index does not exist * @mongodb.driver.manual core/indexes/ Indexes */ public void dropIndex(final String indexName) { try { executor.execute(new DropIndexOperation(getNamespace(), indexName, getWriteConcern()), getReadConcern()); } catch (MongoWriteConcernException e) { throw createWriteConcernException(e); } }
/** * Drops an index from this collection. The DBObject index parameter must match the specification of the index to drop, i.e. correct * key name and type must be specified. * * @param index the specification of the index to drop * @throws MongoException if the index does not exist * @mongodb.driver.manual core/indexes/ Indexes */ public void dropIndex(final DBObject index) { try { executor.execute(new DropIndexOperation(getNamespace(), wrap(index), getWriteConcern()), getReadConcern()); } catch (MongoWriteConcernException e) { throw createWriteConcernException(e); } }
DropIndexOperation dropIndex(final Bson keys, final DropIndexOptions dropIndexOptions) { return new DropIndexOperation(namespace, keys.toBsonDocument(BsonDocument.class, codecRegistry), writeConcern) .maxTime(dropIndexOptions.getMaxTime(MILLISECONDS), MILLISECONDS); }
/** * Drops the index with the given name from this collection. * * @param indexName name of index to drop * @throws MongoException if the index does not exist * @mongodb.driver.manual core/indexes/ Indexes */ public void dropIndex(final String indexName) { try { executor.execute(new DropIndexOperation(getNamespace(), indexName, getWriteConcern()), getReadConcern()); } catch (MongoWriteConcernException e) { throw createWriteConcernException(e); } }
DropIndexOperation dropIndex(final String indexName, final DropIndexOptions dropIndexOptions) { return new DropIndexOperation(namespace, indexName, writeConcern) .maxTime(dropIndexOptions.getMaxTime(MILLISECONDS), MILLISECONDS); }
/** * Drops an index from this collection. The DBObject index parameter must match the specification of the index to drop, i.e. correct * key name and type must be specified. * * @param index the specification of the index to drop * @throws MongoException if the index does not exist * @mongodb.driver.manual core/indexes/ Indexes */ public void dropIndex(final DBObject index) { try { executor.execute(new DropIndexOperation(getNamespace(), wrap(index), getWriteConcern()), getReadConcern()); } catch (MongoWriteConcernException e) { throw createWriteConcernException(e); } }
DropIndexOperation dropIndex(final Bson keys, final DropIndexOptions dropIndexOptions) { return new DropIndexOperation(namespace, keys.toBsonDocument(BsonDocument.class, codecRegistry), writeConcern) .maxTime(dropIndexOptions.getMaxTime(MILLISECONDS), MILLISECONDS); }