public class CreateIndexOptions extends Object
Constructor and Description |
---|
CreateIndexOptions() |
Modifier and Type | Method and Description |
---|---|
CreateIndexOptions |
background(boolean background)
Should the index should be created in the background
|
CreateIndexOptions |
bits(Integer bits)
Sets the number of precision of the stored geohash value of the location data in 2d indexes.
|
CreateIndexOptions |
bucketSize(Double bucketSize)
Sets the specified the number of units within which to group the location values for geoHaystack Indexes
|
CreateIndexOptions |
defaultLanguage(String defaultLanguage)
Sets the language for the text index.
|
CreateIndexOptions |
expireAfterSeconds(Integer expireAfterSeconds)
s the time to live for documents in the collection
|
Integer |
getBits()
Gets the number of precision of the stored geohash value of the location data in 2d indexes.
|
Double |
getBucketSize()
Gets the specified the number of units within which to group the location values for geoHaystack Indexes
|
String |
getDefaultLanguage()
Gets the language for a text index.
|
Integer |
getExpireAfterSeconds()
Gets the time to live for documents in the collection
|
String |
getLanguageOverride()
Gets the name of the field that contains the language string.
|
Double |
getMax()
Gets the upper inclusive boundary for the longitude and latitude values for 2d indexes..
|
Double |
getMin()
Gets the lower inclusive boundary for the longitude and latitude values for 2d indexes..
|
String |
getName()
Gets the name of the index.
|
Integer |
getTextIndexVersion()
The text index version number.
|
Integer |
getTwoDSphereIndexVersion()
Gets the 2dsphere index version number.
|
Integer |
getVersion()
Gets the index version number.
|
Bson |
getWeights()
Gets the weighting object for use with a text index
|
boolean |
isBackground()
Create the index in the background
|
boolean |
isSparse()
If true, the index only references documents with the specified field
|
boolean |
isUnique()
Gets if the index should be unique.
|
CreateIndexOptions |
languageOverride(String languageOverride)
Sets the name of the field that contains the language string.
|
CreateIndexOptions |
max(Double max)
Sets the upper inclusive boundary for the longitude and latitude values for 2d indexes..
|
CreateIndexOptions |
min(Double min)
Sets the lower inclusive boundary for the longitude and latitude values for 2d indexes..
|
CreateIndexOptions |
name(String name)
Sets the name of the index.
|
CreateIndexOptions |
sparse(boolean sparse)
Should the index only references documents with the specified field
|
CreateIndexOptions |
textIndexVersion(int textIndexVersion)
Set the text index version number.
|
CreateIndexOptions |
twoDSphereIndexVersion(int sphereIndexVersion)
Sets the 2dsphere index version number.
|
CreateIndexOptions |
unique(boolean unique)
Should the index should be unique.
|
CreateIndexOptions |
version(Integer version)
Sets the index version number.
|
CreateIndexOptions |
weights(Bson weights)
Sets the weighting object for use with a text index.
|
public boolean isBackground()
public CreateIndexOptions background(boolean background)
background
- true if should create the index in the backgroundpublic boolean isUnique()
public CreateIndexOptions unique(boolean unique)
unique
- if the index should be uniquepublic String getName()
public CreateIndexOptions name(String name)
name
- of the indexpublic boolean isSparse()
public CreateIndexOptions sparse(boolean sparse)
sparse
- if true, the index only references documents with the specified fieldpublic Integer getExpireAfterSeconds()
public CreateIndexOptions expireAfterSeconds(Integer expireAfterSeconds)
expireAfterSeconds
- the time to live for documents in the collectionpublic Integer getVersion()
public CreateIndexOptions version(Integer version)
version
- the index version numberpublic Bson getWeights()
A document that represents field and weight pairs. The weight is an integer ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields in terms of the score.
public CreateIndexOptions weights(Bson weights)
An document that represents field and weight pairs. The weight is an integer ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields in terms of the score.
weights
- the weighting objectpublic String getDefaultLanguage()
The language that determines the list of stop words and the rules for the stemmer and tokenizer.
public CreateIndexOptions defaultLanguage(String defaultLanguage)
The language that determines the list of stop words and the rules for the stemmer and tokenizer.
defaultLanguage
- the language for the text index.public String getLanguageOverride()
For text indexes, the name of the field, in the collection's documents, that contains the override language for the document.
public CreateIndexOptions languageOverride(String languageOverride)
For text indexes, the name of the field, in the collection's documents, that contains the override language for the document.
languageOverride
- the name of the field that contains the language string.public Integer getTextIndexVersion()
public CreateIndexOptions textIndexVersion(int textIndexVersion)
textIndexVersion
- the text index version number.public Integer getTwoDSphereIndexVersion()
public CreateIndexOptions twoDSphereIndexVersion(int sphereIndexVersion)
sphereIndexVersion
- the 2dsphere index version number.public Integer getBits()
public CreateIndexOptions bits(Integer bits)
bits
- the number of precision of the stored geohash valuepublic Double getMin()
public CreateIndexOptions min(Double min)
min
- the lower inclusive boundary for the longitude and latitude valuespublic Double getMax()
public CreateIndexOptions max(Double max)
max
- the upper inclusive boundary for the longitude and latitude valuespublic Double getBucketSize()
public CreateIndexOptions bucketSize(Double bucketSize)
bucketSize
- the specified the number of units within which to group the location values for geoHaystack Indexes