Class/Object

reactivemongo.api.indexes

Index

Related Docs: object Index | package indexes

Permalink

sealed abstract class Index extends AnyRef

A MongoDB index (excluding the namespace).

Consider reading the documentation about indexes in MongoDB.

import reactivemongo.api.bson.BSONDocument
import reactivemongo.api.indexes.{ Index, IndexType }

val bsonIndex = Index(
  key = Seq("name" -> IndexType.Ascending),
  name = Some("name_idx"),
  unique = false,
  background = false,
  sparse = false,
  expireAfterSeconds = None,
  storageEngine = None,
  weights = None,
  defaultLanguage = None,
  languageOverride = None,
  textIndexVersion = None,
  sphereIndexVersion = None,
  bits = None,
  min = None,
  max = None,
  bucketSize = None,
  collation = None,
  wildcardProjection = None,
  version = None,
  partialFilter = None,
  options = BSONDocument.empty)
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Index
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract type Pack <: SerializationPack

    Permalink

Abstract Value Members

  1. abstract def key: Seq[(String, IndexType)]

    Permalink

    The index key (it can be composed of multiple fields).

    The index key (it can be composed of multiple fields). This list should not be empty!

  2. abstract def options: Pack.Document

    Permalink

    Optional parameters for this index (typically specific to an IndexType like Geo2D).

  3. abstract val pack: Pack

    Permalink
  4. abstract def partialFilter: Option[Pack.Document]

    Permalink

    Optional partial filter

    Optional partial filter

    Since

    MongoDB 3.2

Concrete Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Index to any2stringadd[Index] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Index, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Index to ArrowAssoc[Index] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def _2dsphereIndexVersion: Option[Int]

    Permalink

    An optional 2dsphere index version number.

    An optional 2dsphere index version number.

    Annotations
    @SuppressWarnings()
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def background: Boolean

    Permalink

    If this index should be built in background.

    If this index should be built in background. You should read the documentation about background indexing before using it.

  9. def bits: Option[Int]

    Permalink

    Optionally indicates the precision of geohash for 2d indexes.

  10. def bucketSize: Option[Double]

    Permalink

    Optionally specifies the number of units within which to group the location values for geoHaystack indexes.

  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def collation: Option[Collation]

    Permalink

    An optional Collation (default: None)

  13. def defaultLanguage: Option[String]

    Permalink

    An optional default language for text indexes.

  14. def ensuring(cond: (Index) ⇒ Boolean, msg: ⇒ Any): Index

    Permalink
    Implicit information
    This member is added by an implicit conversion from Index to Ensuring[Index] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: (Index) ⇒ Boolean): Index

    Permalink
    Implicit information
    This member is added by an implicit conversion from Index to Ensuring[Index] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean, msg: ⇒ Any): Index

    Permalink
    Implicit information
    This member is added by an implicit conversion from Index to Ensuring[Index] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: Boolean): Index

    Permalink
    Implicit information
    This member is added by an implicit conversion from Index to Ensuring[Index] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. def equals(that: Any): Boolean

    Permalink
    Definition Classes
    Index → AnyRef → Any
    Annotations
    @SuppressWarnings()
  20. lazy val eventualName: String

    Permalink

    The name of the index (a default one is computed if none).

  21. def expireAfterSeconds: Option[Int]

    Permalink

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

  22. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Index to StringFormat[Index] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  24. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  25. def hashCode(): Int

    Permalink
    Definition Classes
    Index → AnyRef → Any
  26. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  27. def languageOverride: Option[String]

    Permalink

    An optional language override for text indexes.

  28. def max: Option[Double]

    Permalink

    Optionally indicates the upper inclusive boundary for longitude and latitude for 2d indexes.

  29. def min: Option[Double]

    Permalink

    Optionally indicates the lower inclusive boundary for longitude and latitude for 2d indexes.

  30. def name: Option[String]

    Permalink

    The name of this index (default: None).

    The name of this index (default: None). If you provide none, a name will be computed for you.

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

    Permalink
    Definition Classes
    AnyRef
  32. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. def sparse: Boolean

    Permalink

    The flags to indicates if the index to build should only consider the documents that have the indexed fields (default: false).

    The flags to indicates if the index to build should only consider the documents that have the indexed fields (default: false).

    See the documentation on the consequences of such an index.

  35. def storageEngine: Option[Pack.Document]

    Permalink

    Optionally specifies a configuration for the storage engine on a per-index basis when creating an index.

    Optionally specifies a configuration for the storage engine on a per-index basis when creating an index.

    Since

    MongoDB 3.0

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

    Permalink
    Definition Classes
    AnyRef
  37. def textIndexVersion: Option[Int]

    Permalink

    An optional text index version number.

  38. def toString(): String

    Permalink
    Definition Classes
    Index → AnyRef → Any
  39. def unique: Boolean

    Permalink

    The flag to enforces uniqueness (default: false)

  40. def version: Option[Int]

    Permalink

    Indicates the version of the index (1 for >= 2.0, else 0).

    Indicates the version of the index (1 for >= 2.0, else 0). You should let MongoDB decide.

  41. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. def weights: Option[Pack.Document]

    Permalink

    An optional document that contains field and weight pairs for text indexes.

  45. def wildcardProjection: Option[Pack.Document]

    Permalink
  46. def [B](y: B): (Index, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Index to ArrowAssoc[Index] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Index to any2stringadd[Index]

Inherited by implicit conversion StringFormat from Index to StringFormat[Index]

Inherited by implicit conversion Ensuring from Index to Ensuring[Index]

Inherited by implicit conversion ArrowAssoc from Index to ArrowAssoc[Index]

Ungrouped