Class TextIndexDefinition.TextIndexDefinitionBuilder
java.lang.Object
org.springframework.data.mongodb.core.index.TextIndexDefinition.TextIndexDefinitionBuilder
- Enclosing class:
- TextIndexDefinition
TextIndexDefinition.TextIndexDefinitionBuilder
helps defining options for creating TextIndexDefinition
.- Since:
- 1.6
- Author:
- Christoph Strobl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Define the name to be used when creating the index in the store.Define the index to span all fields using wildcard.Include given field with default weight.Include given field with weight.Include given fields with default weight.partial
(IndexFilter filter) Only index the documents that meet the specifiedfilter expression
.withDefaultLanguage
(String language) Define the default language to be used when indexing documents.withLanguageOverride
(String fieldname) Define field for language override.Configure to use simpleCollation
.
-
Constructor Details
-
TextIndexDefinitionBuilder
public TextIndexDefinitionBuilder()
-
-
Method Details
-
named
Define the name to be used when creating the index in the store.- Parameters:
name
-- Returns:
-
onAllFields
Define the index to span all fields using wildcard.
NOTE:TextIndexDefinition
cannot contain any other fields when defined with wildcard.- Returns:
-
onFields
Include given fields with default weight.- Parameters:
fieldnames
-- Returns:
-
onField
Include given field with default weight.- Parameters:
fieldname
-- Returns:
-
onField
Include given field with weight.- Parameters:
fieldname
-- Returns:
-
withDefaultLanguage
Define the default language to be used when indexing documents.- Parameters:
language
-- Returns:
- See Also:
-
withLanguageOverride
Define field for language override.- Parameters:
fieldname
-- Returns:
-
partial
Only index the documents that meet the specifiedfilter expression
.- Parameters:
filter
- can be null.- Returns:
- Since:
- 1.10
- See Also:
-
withSimpleCollation
Configure to use simpleCollation
. Required if the collection uses a non-simple collation.- Since:
- 2.2
-
build
-