Class IndexOptions
- java.lang.Object
 - 
- com.mongodb.client.model.IndexOptions
 
 
- 
@Deprecated(since="2021-05-27") public class IndexOptions extends java.lang.ObjectDeprecated.Usage of this API is not supported in AEM as a Cloud Service.The options to apply to the creation of an index.- Since:
 - 3.0
 
 
- 
- 
Constructor Summary
Constructors Constructor Description IndexOptions()Deprecated. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IndexOptionsbackground(boolean background)Deprecated.Should the index should be created in the backgroundIndexOptionsbits(java.lang.Integer bits)Deprecated.Sets the number of precision of the stored geohash value of the location data in 2d indexes.IndexOptionsbucketSize(java.lang.Double bucketSize)Deprecated.Sets the specified the number of units within which to group the location values for geoHaystack IndexesIndexOptionscollation(Collation collation)Deprecated.Sets the collation optionsIndexOptionsdefaultLanguage(java.lang.String defaultLanguage)Deprecated.Sets the language for the text index.IndexOptionsexpireAfter(java.lang.Long expireAfter, java.util.concurrent.TimeUnit timeUnit)Deprecated.Sets the time to live for documents in the collectionjava.lang.IntegergetBits()Deprecated.Gets the number of precision of the stored geohash value of the location data in 2d indexes.java.lang.DoublegetBucketSize()Deprecated.Gets the specified the number of units within which to group the location values for geoHaystack IndexesCollationgetCollation()Deprecated.Returns the collation optionsjava.lang.StringgetDefaultLanguage()Deprecated.Gets the language for a text index.java.lang.LonggetExpireAfter(java.util.concurrent.TimeUnit timeUnit)Deprecated.Gets the time to live for documents in the collectionjava.lang.StringgetLanguageOverride()Deprecated.Gets the name of the field that contains the language string.java.lang.DoublegetMax()Deprecated.Gets the upper inclusive boundary for the longitude and latitude values for 2d indexes..java.lang.DoublegetMin()Deprecated.Gets the lower inclusive boundary for the longitude and latitude values for 2d indexes..java.lang.StringgetName()Deprecated.Gets the name of the index.BsongetPartialFilterExpression()Deprecated.Get the filter expression for the documents to be included in the index or null if not setjava.lang.IntegergetSphereVersion()Deprecated.Gets the 2dsphere index version number.BsongetStorageEngine()Deprecated.Gets the storage engine options document for this index.java.lang.IntegergetTextVersion()Deprecated.The text index version number.java.lang.IntegergetVersion()Deprecated.Gets the index version number.BsongetWeights()Deprecated.Gets the weighting object for use with a text indexBsongetWildcardProjection()Deprecated.Gets the wildcard projection of a wildcard indexbooleanisBackground()Deprecated.Create the index in the backgroundbooleanisSparse()Deprecated.If true, the index only references documents with the specified fieldbooleanisUnique()Deprecated.Gets if the index should be unique.IndexOptionslanguageOverride(java.lang.String languageOverride)Deprecated.Sets the name of the field that contains the language string.IndexOptionsmax(java.lang.Double max)Deprecated.Sets the upper inclusive boundary for the longitude and latitude values for 2d indexes..IndexOptionsmin(java.lang.Double min)Deprecated.Sets the lower inclusive boundary for the longitude and latitude values for 2d indexes..IndexOptionsname(java.lang.String name)Deprecated.Sets the name of the index.IndexOptionspartialFilterExpression(Bson partialFilterExpression)Deprecated.Sets the filter expression for the documents to be included in the indexIndexOptionssparse(boolean sparse)Deprecated.Should the index only references documents with the specified fieldIndexOptionssphereVersion(java.lang.Integer sphereVersion)Deprecated.Sets the 2dsphere index version number.IndexOptionsstorageEngine(Bson storageEngine)Deprecated.Sets the storage engine options document for this index.IndexOptionstextVersion(java.lang.Integer textVersion)Deprecated.Set the text index version number.java.lang.StringtoString()Deprecated.IndexOptionsunique(boolean unique)Deprecated.Should the index should be unique.IndexOptionsversion(java.lang.Integer version)Deprecated.Sets the index version number.IndexOptionsweights(Bson weights)Deprecated.Sets the weighting object for use with a text index.IndexOptionswildcardProjection(Bson wildcardProjection)Deprecated.Sets the wildcard projection of a wildcard index 
 - 
 
- 
- 
Method Detail
- 
isBackground
public boolean isBackground()
Deprecated.Create the index in the background- Returns:
 - true if should create the index in the background
 
 
- 
background
public IndexOptions background(boolean background)
Deprecated.Should the index should be created in the background- Parameters:
 background- true if should create the index in the background- Returns:
 - this
 
 
- 
isUnique
public boolean isUnique()
Deprecated.Gets if the index should be unique.- Returns:
 - true if the index should be unique
 
 
- 
unique
public IndexOptions unique(boolean unique)
Deprecated.Should the index should be unique.- Parameters:
 unique- if the index should be unique- Returns:
 - this
 
 
- 
getName
@Nullable public java.lang.String getName()
Deprecated.Gets the name of the index.- Returns:
 - the name of the index
 
 
- 
name
public IndexOptions name(@Nullable java.lang.String name)
Deprecated.Sets the name of the index.- Parameters:
 name- of the index- Returns:
 - this
 
 
- 
isSparse
public boolean isSparse()
Deprecated.If true, the index only references documents with the specified field- Returns:
 - if the index should only reference documents with the specified field
 
 
- 
sparse
public IndexOptions sparse(boolean sparse)
Deprecated.Should the index only references documents with the specified field- Parameters:
 sparse- if true, the index only references documents with the specified field- Returns:
 - this
 
 
- 
getExpireAfter
@Nullable public java.lang.Long getExpireAfter(java.util.concurrent.TimeUnit timeUnit)
Deprecated.Gets the time to live for documents in the collection- Parameters:
 timeUnit- the time unit- Returns:
 - the time to live for documents in the collection
 
 
- 
expireAfter
public IndexOptions expireAfter(@Nullable java.lang.Long expireAfter, java.util.concurrent.TimeUnit timeUnit)
Deprecated.Sets the time to live for documents in the collection- Parameters:
 expireAfter- the time to live for documents in the collectiontimeUnit- the time unit for expireAfter- Returns:
 - this
 
 
- 
getVersion
@Nullable public java.lang.Integer getVersion()
Deprecated.Gets the index version number.- Returns:
 - the index version number
 
 
- 
version
public IndexOptions version(@Nullable java.lang.Integer version)
Deprecated.Sets the index version number.- Parameters:
 version- the index version number- Returns:
 - this
 
 
- 
getWeights
@Nullable public Bson getWeights()
Deprecated.Gets the weighting object for use with a text indexA 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.
- Returns:
 - the weighting object
 
 
- 
weights
public IndexOptions weights(@Nullable Bson weights)
Deprecated.Sets the weighting object for use with a text index.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.
- Parameters:
 weights- the weighting object- Returns:
 - this
 
 
- 
getDefaultLanguage
@Nullable public java.lang.String getDefaultLanguage()
Deprecated.Gets the language for a text index.The language that determines the list of stop words and the rules for the stemmer and tokenizer.
- Returns:
 - the language for a text index.
 
 
- 
defaultLanguage
public IndexOptions defaultLanguage(@Nullable java.lang.String defaultLanguage)
Deprecated.Sets the language for the text index.The language that determines the list of stop words and the rules for the stemmer and tokenizer.
- Parameters:
 defaultLanguage- the language for the text index.- Returns:
 - this
 
 
- 
getLanguageOverride
@Nullable public java.lang.String getLanguageOverride()
Deprecated.Gets the name of the field that contains the language string.For text indexes, the name of the field, in the collection's documents, that contains the override language for the document.
- Returns:
 - the name of the field that contains the language string.
 
 
- 
languageOverride
public IndexOptions languageOverride(@Nullable java.lang.String languageOverride)
Deprecated.Sets the name of the field that contains the language string.For text indexes, the name of the field, in the collection's documents, that contains the override language for the document.
- Parameters:
 languageOverride- the name of the field that contains the language string.- Returns:
 - this
 
 
- 
getTextVersion
@Nullable public java.lang.Integer getTextVersion()
Deprecated.The text index version number.- Returns:
 - the text index version number.
 
 
- 
textVersion
public IndexOptions textVersion(@Nullable java.lang.Integer textVersion)
Deprecated.Set the text index version number.- Parameters:
 textVersion- the text index version number.- Returns:
 - this
 
 
- 
getSphereVersion
@Nullable public java.lang.Integer getSphereVersion()
Deprecated.Gets the 2dsphere index version number.- Returns:
 - the 2dsphere index version number
 
 
- 
sphereVersion
public IndexOptions sphereVersion(@Nullable java.lang.Integer sphereVersion)
Deprecated.Sets the 2dsphere index version number.- Parameters:
 sphereVersion- the 2dsphere index version number.- Returns:
 - this
 
 
- 
getBits
@Nullable public java.lang.Integer getBits()
Deprecated.Gets the number of precision of the stored geohash value of the location data in 2d indexes.- Returns:
 - the number of precision of the stored geohash value
 
 
- 
bits
public IndexOptions bits(@Nullable java.lang.Integer bits)
Deprecated.Sets the number of precision of the stored geohash value of the location data in 2d indexes.- Parameters:
 bits- the number of precision of the stored geohash value- Returns:
 - this
 
 
- 
getMin
@Nullable public java.lang.Double getMin()
Deprecated.Gets the lower inclusive boundary for the longitude and latitude values for 2d indexes..- Returns:
 - the lower inclusive boundary for the longitude and latitude values.
 
 
- 
min
public IndexOptions min(@Nullable java.lang.Double min)
Deprecated.Sets the lower inclusive boundary for the longitude and latitude values for 2d indexes..- Parameters:
 min- the lower inclusive boundary for the longitude and latitude values- Returns:
 - this
 
 
- 
getMax
@Nullable public java.lang.Double getMax()
Deprecated.Gets the upper inclusive boundary for the longitude and latitude values for 2d indexes..- Returns:
 - the upper inclusive boundary for the longitude and latitude values.
 
 
- 
max
public IndexOptions max(@Nullable java.lang.Double max)
Deprecated.Sets the upper inclusive boundary for the longitude and latitude values for 2d indexes..- Parameters:
 max- the upper inclusive boundary for the longitude and latitude values- Returns:
 - this
 
 
- 
getBucketSize
@Nullable public java.lang.Double getBucketSize()
Deprecated.Gets the specified the number of units within which to group the location values for geoHaystack Indexes- Returns:
 - the specified the number of units within which to group the location values for geoHaystack Indexes
 
 
- 
bucketSize
public IndexOptions bucketSize(@Nullable java.lang.Double bucketSize)
Deprecated.Sets the specified the number of units within which to group the location values for geoHaystack Indexes- Parameters:
 bucketSize- the specified the number of units within which to group the location values for geoHaystack Indexes- Returns:
 - this
 
 
- 
getStorageEngine
@Nullable public Bson getStorageEngine()
Deprecated.Gets the storage engine options document for this index.- Returns:
 - the storage engine options
 
 
- 
storageEngine
public IndexOptions storageEngine(@Nullable Bson storageEngine)
Deprecated.Sets the storage engine options document for this index.- Parameters:
 storageEngine- the storage engine options- Returns:
 - this
 
 
- 
getPartialFilterExpression
@Nullable public Bson getPartialFilterExpression()
Deprecated.Get the filter expression for the documents to be included in the index or null if not set- Returns:
 - the filter expression for the documents to be included in the index or null if not set
 - Since:
 - 3.2
 
 
- 
partialFilterExpression
public IndexOptions partialFilterExpression(@Nullable Bson partialFilterExpression)
Deprecated.Sets the filter expression for the documents to be included in the index- Parameters:
 partialFilterExpression- the filter expression for the documents to be included in the index- Returns:
 - this
 - Since:
 - 3.2
 
 
- 
getCollation
@Nullable public Collation getCollation()
Deprecated.Returns the collation options- Returns:
 - the collation options
 - Since:
 - 3.4
 
 
- 
collation
public IndexOptions collation(@Nullable Collation collation)
Deprecated.Sets the collation optionsA null value represents the server default.
- Parameters:
 collation- the collation options to use- Returns:
 - this
 - Since:
 - 3.4
 
 
- 
getWildcardProjection
public Bson getWildcardProjection()
Deprecated.Gets the wildcard projection of a wildcard index- Returns:
 - the wildcard projection
 - Since:
 - 3.10
 
 
- 
wildcardProjection
public IndexOptions wildcardProjection(Bson wildcardProjection)
Deprecated.Sets the wildcard projection of a wildcard index- Parameters:
 wildcardProjection- the wildcard projection- Returns:
 - this
 - Since:
 - 3.10
 
 
- 
toString
public java.lang.String toString()
Deprecated.- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -