net.fehmicansaglam.tepkin.protocol.command

Index

Related Docs: object Index | package command

case class Index(key: BsonDocument, name: String, background: Option[Boolean] = None, unique: Option[Boolean] = None, sparse: Option[Boolean] = None, expireAfterSeconds: Option[Int] = None, storageEngine: Option[BsonDocument] = None, weights: Option[BsonDocument] = None, defaultLanguage: Option[String] = None, languageOverride: Option[String] = None, textIndexVersion: Option[Int] = None, _2dSphereIndexVersion: Option[Int] = None, bits: Option[Int] = None, min: Option[Double] = None, max: Option[Double] = None, bucketSize: Option[Int] = None, ns: Option[String] = None) extends Product with Serializable

key

Specifies the index’s fields. For each field, specify a key-value pair in which the key is the name of the field to index and the value is either the index direction or index type. If specifying direction, specify 1 for ascending or -1 for descending.

name

A name that uniquely identifies the index.

background

Builds the index in the background so that building an index does not block other database activities. Specify true to build in the background. The default value is false.

unique

Creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. Specify true to create a unique index. The default value is false.

sparse

If true, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). The default value is false.

expireAfterSeconds

Specifies a value, in seconds, as a TTL to control how long MongoDB retains documents in this collection.

storageEngine

Allows users to specify configuration to the storage engine on a per-index basis when creating an index.

weights

For text indexes, a document that contains 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. You can specify weights for some or all the indexed fields. The default value is 1.

defaultLanguage

For text indexes, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is english.

languageOverride

For text indexes, the name of the field, in the collection’s documents, that contains the override language for the document. The default value is language.

textIndexVersion

For text indexes, the text index version number. Version can be either 1 or 2.

_2dSphereIndexVersion

For 2dsphere indexes, the 2dsphere index version number. Version can be either 1 or 2.

bits

For 2d indexes, the number of precision of the stored geohash value of the location data.

min

For 2d indexes, the lower inclusive boundary for the longitude and latitude values. The default value is -180.0.

max

For 2d indexes, the upper inclusive boundary for the longitude and latitude values. The default value is 180.0.

bucketSize

For geoHaystack indexes, specify the number of units within which to group the location values; i.e. group in the same bucket those location values that are within the specified number of units to each other. The value must be greater than 0.

ns

The namespace (i.e. <database>.<collection>) of the collection for which to create the index. If you omit ns, MongoDB generates the namespace.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Index
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Index(key: BsonDocument, name: String, background: Option[Boolean] = None, unique: Option[Boolean] = None, sparse: Option[Boolean] = None, expireAfterSeconds: Option[Int] = None, storageEngine: Option[BsonDocument] = None, weights: Option[BsonDocument] = None, defaultLanguage: Option[String] = None, languageOverride: Option[String] = None, textIndexVersion: Option[Int] = None, _2dSphereIndexVersion: Option[Int] = None, bits: Option[Int] = None, min: Option[Double] = None, max: Option[Double] = None, bucketSize: Option[Int] = None, ns: Option[String] = None)

    key

    Specifies the index’s fields. For each field, specify a key-value pair in which the key is the name of the field to index and the value is either the index direction or index type. If specifying direction, specify 1 for ascending or -1 for descending.

    name

    A name that uniquely identifies the index.

    background

    Builds the index in the background so that building an index does not block other database activities. Specify true to build in the background. The default value is false.

    unique

    Creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. Specify true to create a unique index. The default value is false.

    sparse

    If true, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). The default value is false.

    expireAfterSeconds

    Specifies a value, in seconds, as a TTL to control how long MongoDB retains documents in this collection.

    storageEngine

    Allows users to specify configuration to the storage engine on a per-index basis when creating an index.

    weights

    For text indexes, a document that contains 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. You can specify weights for some or all the indexed fields. The default value is 1.

    defaultLanguage

    For text indexes, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is english.

    languageOverride

    For text indexes, the name of the field, in the collection’s documents, that contains the override language for the document. The default value is language.

    textIndexVersion

    For text indexes, the text index version number. Version can be either 1 or 2.

    _2dSphereIndexVersion

    For 2dsphere indexes, the 2dsphere index version number. Version can be either 1 or 2.

    bits

    For 2d indexes, the number of precision of the stored geohash value of the location data.

    min

    For 2d indexes, the lower inclusive boundary for the longitude and latitude values. The default value is -180.0.

    max

    For 2d indexes, the upper inclusive boundary for the longitude and latitude values. The default value is 180.0.

    bucketSize

    For geoHaystack indexes, specify the number of units within which to group the location values; i.e. group in the same bucket those location values that are within the specified number of units to each other. The value must be greater than 0.

    ns

    The namespace (i.e. <database>.<collection>) of the collection for which to create the index. If you omit ns, MongoDB generates the namespace.

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. val _2dSphereIndexVersion: Option[Int]

    For 2dsphere indexes, the 2dsphere index version number.

    For 2dsphere indexes, the 2dsphere index version number. Version can be either 1 or 2.

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. val background: Option[Boolean]

    Builds the index in the background so that building an index does not block other database activities.

    Builds the index in the background so that building an index does not block other database activities. Specify true to build in the background. The default value is false.

  7. val bits: Option[Int]

    For 2d indexes, the number of precision of the stored geohash value of the location data.

  8. val bucketSize: Option[Int]

    For geoHaystack indexes, specify the number of units within which to group the location values; i.e.

    For geoHaystack indexes, specify the number of units within which to group the location values; i.e. group in the same bucket those location values that are within the specified number of units to each other. The value must be greater than 0.

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. val defaultLanguage: Option[String]

    For text indexes, the language that determines the list of stop words and the rules for the stemmer and tokenizer.

    For text indexes, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is english.

  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. val expireAfterSeconds: Option[Int]

    Specifies a value, in seconds, as a TTL to control how long MongoDB retains documents in this collection.

  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. val key: BsonDocument

    Specifies the index’s fields.

    Specifies the index’s fields. For each field, specify a key-value pair in which the key is the name of the field to index and the value is either the index direction or index type. If specifying direction, specify 1 for ascending or -1 for descending.

  17. val languageOverride: Option[String]

    For text indexes, the name of the field, in the collection’s documents, that contains the override language for the document.

    For text indexes, the name of the field, in the collection’s documents, that contains the override language for the document. The default value is language.

  18. val max: Option[Double]

    For 2d indexes, the upper inclusive boundary for the longitude and latitude values.

    For 2d indexes, the upper inclusive boundary for the longitude and latitude values. The default value is 180.0.

  19. val min: Option[Double]

    For 2d indexes, the lower inclusive boundary for the longitude and latitude values.

    For 2d indexes, the lower inclusive boundary for the longitude and latitude values. The default value is -180.0.

  20. val name: String

    A name that uniquely identifies the index.

  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  24. val ns: Option[String]

    The namespace (i.e.

    The namespace (i.e. <database>.<collection>) of the collection for which to create the index. If you omit ns, MongoDB generates the namespace.

  25. val sparse: Option[Boolean]

    If true, the index only references documents with the specified field.

    If true, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). The default value is false.

  26. val storageEngine: Option[BsonDocument]

    Allows users to specify configuration to the storage engine on a per-index basis when creating an index.

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. val textIndexVersion: Option[Int]

    For text indexes, the text index version number.

    For text indexes, the text index version number. Version can be either 1 or 2.

  29. val toDoc: BsonDocument

  30. val unique: Option[Boolean]

    Creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index.

    Creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. Specify true to create a unique index. The default value is false.

  31. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. val weights: Option[BsonDocument]

    For text indexes, a document that contains field and weight pairs.

    For text indexes, a document that contains 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. You can specify weights for some or all the indexed fields. The default value is 1.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped