io.vertx.ext.mongo

## Class IndexOptions

- java.lang.Object
- - io.vertx.ext.mongo.IndexOptions

-     public class IndexOptions
      extends Object

  Options used to configure index.
  Author:
    Ruslan Sennov

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `DEFAULT_BACKGROUD`
    `static boolean` | `DEFAULT_SPARSE`
    `static boolean` | `DEFAULT_UNIQUE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IndexOptions()` Default constructor
    `IndexOptions(IndexOptions options)` Copy constructor
    `IndexOptions(JsonObject options)` Constructor from JSON

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IndexOptions` | `background(boolean background)` Should the index should be created in the background
    `IndexOptions` | `bits(Integer bits)` Sets the number of precision of the stored geohash value of the location data in 2d indexes.
    `IndexOptions` | `bucketSize(Double bucketSize)` Sets the specified the number of units within which to group the location values for geoHaystack Indexes
    `IndexOptions` | `defaultLanguage(String defaultLanguage)` Sets the language for the text index.
    `IndexOptions` | `expireAfter(Long expireAfter, TimeUnit timeUnit)` Sets 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.
    `Long` | `getExpireAfter(TimeUnit timeUnit)` 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.
    `JsonObject` | `getPartialFilterExpression()` Get the filter expression for the documents to be included in the index or null if not set
    `Integer` | `getSphereVersion()` Gets the 2dsphere index version number.
    `JsonObject` | `getStorageEngine()` Gets the storage engine options document for this index.
    `Integer` | `getTextVersion()` The text index version number.
    `Integer` | `getVersion()` Gets the index version number.
    `JsonObject` | `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.
    `IndexOptions` | `languageOverride(String languageOverride)` Sets the name of the field that contains the language string.
    `IndexOptions` | `max(Double max)` Sets the upper inclusive boundary for the longitude and latitude values for 2d indexes..
    `IndexOptions` | `min(Double min)` Sets the lower inclusive boundary for the longitude and latitude values for 2d indexes..
    `IndexOptions` | `name(String name)` Sets the name of the index.
    `IndexOptions` | `partialFilterExpression(JsonObject partialFilterExpression)` Sets the filter expression for the documents to be included in the index
    `IndexOptions` | `sparse(boolean sparse)` Should the index only references documents with the specified field
    `IndexOptions` | `sphereVersion(Integer sphereVersion)` Sets the 2dsphere index version number.
    `IndexOptions` | `storageEngine(JsonObject storageEngine)` Sets the storage engine options document for this index.
    `IndexOptions` | `textVersion(Integer textVersion)` Set the text index version number.
    `JsonObject` | `toJson()` Convert to JSON
    `IndexOptions` | `unique(boolean unique)` Should the index should be unique.
    `IndexOptions` | `version(Integer version)` Sets the index version number.
    `IndexOptions` | `weights(JsonObject weights)` Sets the weighting object for use with a text index.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_BACKGROUD

          public static final boolean DEFAULT_BACKGROUD

      See Also:
        Constant Field Values

    - #### DEFAULT_UNIQUE

          public static final boolean DEFAULT_UNIQUE

      See Also:
        Constant Field Values

    - #### DEFAULT_SPARSE

          public static final boolean DEFAULT_SPARSE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### IndexOptions

          public IndexOptions()

      Default constructor

    - #### IndexOptions

          public IndexOptions(IndexOptions options)

      Copy constructor
      Parameters:
        `options` - the one to copy

    - #### IndexOptions

          public IndexOptions(JsonObject options)

      Constructor from JSON
      Parameters:
        `options` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON

    - #### isBackground

          public boolean isBackground()

      Create the index in the background
      Returns:
        true if should create the index in the background

    - #### background

          public IndexOptions background(boolean background)

      Should the index should be created in the background
      Parameters:
        `background` - true if should create the index in the background
      Returns:
        reference to this, for fluency

    - #### isUnique

          public boolean isUnique()

      Gets if the index should be unique.
      Returns:
        true if the index should be unique

    - #### unique

          public IndexOptions unique(boolean unique)

      Should the index should be unique.
      Parameters:
        `unique` - if the index should be unique
      Returns:
        reference to this, for fluency

    - #### getName

          public String getName()

      Gets the name of the index.
      Returns:
        the name of the index

    - #### name

          public IndexOptions name(String name)

      Sets the name of the index.
      Parameters:
        `name` - of the index
      Returns:
        reference to this, for fluency

    - #### isSparse

          public boolean isSparse()

      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)

      Should the index only references documents with the specified field
      Parameters:
        `sparse` - if true, the index only references documents with the specified field
      Returns:
        reference to this, for fluency

    - #### getExpireAfter

          public Long getExpireAfter(TimeUnit timeUnit)

      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(Long expireAfter,
                                          TimeUnit timeUnit)

      Sets the time to live for documents in the collection
      Parameters:
        `expireAfter` - the time to live for documents in the collection
        `timeUnit` - the time unit for expireAfter
      Returns:
        reference to this, for fluency

    - #### getVersion

          public Integer getVersion()

      Gets the index version number.
      Returns:
        the index version number

    - #### version

          public IndexOptions version(Integer version)

      Sets the index version number.
      Parameters:
        `version` - the index version number
      Returns:
        reference to this, for fluency

    - #### getWeights

          public JsonObject getWeights()

      Gets the weighting object for use with a text index

      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.

      Returns:
        the weighting object

    - #### weights

          public IndexOptions weights(JsonObject weights)

      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:
        reference to this, for fluency

    - #### getDefaultLanguage

          public String getDefaultLanguage()

      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(String defaultLanguage)

      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:
        reference to this, for fluency

    - #### getLanguageOverride

          public String getLanguageOverride()

      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(String languageOverride)

      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:
        reference to this, for fluency

    - #### getTextVersion

          public Integer getTextVersion()

      The text index version number.
      Returns:
        the text index version number.

    - #### textVersion

          public IndexOptions textVersion(Integer textVersion)

      Set the text index version number.
      Parameters:
        `textVersion` - the text index version number.
      Returns:
        reference to this, for fluency

    - #### getSphereVersion

          public Integer getSphereVersion()

      Gets the 2dsphere index version number.
      Returns:
        the 2dsphere index version number

    - #### sphereVersion

          public IndexOptions sphereVersion(Integer sphereVersion)

      Sets the 2dsphere index version number.
      Parameters:
        `sphereVersion` - the 2dsphere index version number.
      Returns:
        reference to this, for fluency

    - #### getBits

          public Integer getBits()

      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(Integer bits)

      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:
        reference to this, for fluency

    - #### getMin

          public Double getMin()

      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(Double min)

      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:
        reference to this, for fluency

    - #### getMax

          public Double getMax()

      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(Double max)

      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:
        reference to this, for fluency

    - #### getBucketSize

          public Double getBucketSize()

      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(Double bucketSize)

      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:
        reference to this, for fluency

    - #### getStorageEngine

          public JsonObject getStorageEngine()

      Gets the storage engine options document for this index.
      Returns:
        the storage engine options

    - #### storageEngine

          public IndexOptions storageEngine(JsonObject storageEngine)

      Sets the storage engine options document for this index.
      Parameters:
        `storageEngine` - the storage engine options
      Returns:
        reference to this, for fluency

    - #### getPartialFilterExpression

          public JsonObject getPartialFilterExpression()

      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

    - #### partialFilterExpression

          public IndexOptions partialFilterExpression(JsonObject partialFilterExpression)

      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:
        reference to this, for fluency

Copyright © 2018 Eclipse. All rights reserved.