Spring Data Document

org.springframework.data.mongodb.core
Interface IndexOperations

All Known Implementing Classes:
DefaultIndexOperations

public interface IndexOperations

Index operations on a collection.

Author:
Mark Pollack, Oliver Gierke

Method Summary
 void dropAllIndexes()
          Drops all indices from this collection.
 void dropIndex(String name)
          Drops an index from this collection.
 void ensureIndex(IndexDefinition indexDefinition)
          Ensure that an index for the provided IndexDefinition exists for the collection indicated by the entity class.
 List<IndexInfo> getIndexInfo()
          Returns the index information on the collection.
 void resetIndexCache()
          Clears all indices that have not yet been applied to this collection.
 

Method Detail

ensureIndex

void ensureIndex(IndexDefinition indexDefinition)
Ensure that an index for the provided IndexDefinition exists for the collection indicated by the entity class. If not it will be created.

Parameters:
indexDefinition - must not be null.

dropIndex

void dropIndex(String name)
Drops an index from this collection.

Parameters:
name - name of index to drop

dropAllIndexes

void dropAllIndexes()
Drops all indices from this collection.


resetIndexCache

void resetIndexCache()
Clears all indices that have not yet been applied to this collection.


getIndexInfo

List<IndexInfo> getIndexInfo()
Returns the index information on the collection.

Returns:
index information on the collection

Spring Data Document

Copyright © 2012. All Rights Reserved.