Class HashedIndex
java.lang.Object
org.springframework.data.mongodb.core.index.HashedIndex
- All Implemented Interfaces:
IndexDefinition
IndexDefinition implementation for MongoDB
Hashed Indexes maintaining entries with hashes of
the values of the indexed field.- Since:
- 2.2
- Author:
- Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionorg.bson.DocumentGet theDocumentcontaining properties covered by the index.org.bson.DocumentGet the index properties such as unique,...static HashedIndexCreates a newHashedIndexfor the given field.
-
Method Details
-
hashed
Creates a newHashedIndexfor the given field.- Parameters:
field- must not be null nor empty.- Returns:
- new instance of
HashedIndex.
-
getIndexKeys
public org.bson.Document getIndexKeys()Description copied from interface:IndexDefinitionGet theDocumentcontaining properties covered by the index.- Specified by:
getIndexKeysin interfaceIndexDefinition- Returns:
- never null.
-
getIndexOptions
public org.bson.Document getIndexOptions()Description copied from interface:IndexDefinitionGet the index properties such as unique,...- Specified by:
getIndexOptionsin interfaceIndexDefinition- Returns:
- never null.
-