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.Document
Get theDocument
containing properties covered by the index.org.bson.Document
Get the index properties such as unique,...static HashedIndex
Creates a newHashedIndex
for the given field.
-
Method Details
-
hashed
Creates a newHashedIndex
for 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:IndexDefinition
Get theDocument
containing properties covered by the index.- Specified by:
getIndexKeys
in interfaceIndexDefinition
- Returns:
- never null.
-
getIndexOptions
public org.bson.Document getIndexOptions()Description copied from interface:IndexDefinition
Get the index properties such as unique,...- Specified by:
getIndexOptions
in interfaceIndexDefinition
- Returns:
- never null.
-