Class TextIndexDefinition
java.lang.Object
org.springframework.data.mongodb.core.index.TextIndexDefinition
- All Implemented Interfaces:
IndexDefinition
IndexDefinition
to span multiple keys for text search.- Since:
- 1.6
- Author:
- Christoph Strobl, Mark Paluch
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
TextIndexDefinition.TextIndexDefinitionBuilder
helps defining options for creatingTextIndexDefinition
.static class
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
builder()
static TextIndexDefinition
Creates aTextIndexDefinition
for all fields in the document.org.bson.Document
Get theDocument
containing properties covered by the index.org.bson.Document
Get the index properties such as unique,...boolean
Returns if theTextIndexDefinition
has fields assigned.
-
Method Details
-
forAllFields
Creates aTextIndexDefinition
for all fields in the document.- Returns:
-
builder
- Returns:
-
addFieldSpec
- Parameters:
fieldSpec
-
-
addFieldSpecs
- Parameters:
fieldSpecs
-
-
hasFieldSpec
public boolean hasFieldSpec()Returns if theTextIndexDefinition
has fields assigned.- Returns:
-
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.
-