public class TextIndexDefinition extends Object implements IndexDefinition
IndexDefinition to span multiple keys for text search.| Modifier and Type | Class and Description |
|---|---|
static class |
TextIndexDefinition.TextIndexDefinitionBuilder
TextIndexDefinition.TextIndexDefinitionBuilder helps defining options for creating TextIndexDefinition. |
static class |
TextIndexDefinition.TextIndexedFieldSpec |
| Modifier and Type | Method and Description |
|---|---|
void |
addFieldSpec(TextIndexDefinition.TextIndexedFieldSpec fieldSpec) |
void |
addFieldSpecs(Collection<TextIndexDefinition.TextIndexedFieldSpec> fieldSpecs) |
static TextIndexDefinition.TextIndexDefinitionBuilder |
builder()
|
static TextIndexDefinition |
forAllFields()
Creates a
TextIndexDefinition for all fields in the document. |
org.bson.Document |
getIndexKeys() |
org.bson.Document |
getIndexOptions() |
boolean |
hasFieldSpec()
Returns if the
TextIndexDefinition has fields assigned. |
public static TextIndexDefinition forAllFields()
TextIndexDefinition for all fields in the document.public static TextIndexDefinition.TextIndexDefinitionBuilder builder()
public void addFieldSpec(TextIndexDefinition.TextIndexedFieldSpec fieldSpec)
fieldSpec - public void addFieldSpecs(Collection<TextIndexDefinition.TextIndexedFieldSpec> fieldSpecs)
fieldSpecs - public boolean hasFieldSpec()
TextIndexDefinition has fields assigned.public org.bson.Document getIndexKeys()
getIndexKeys in interface IndexDefinitionpublic org.bson.Document getIndexOptions()
getIndexOptions in interface IndexDefinitionCopyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.