Object

org.mongodb.scala.model

Indexes

Related Doc: package model

Permalink

object Indexes

A factory for defining index keys. A convenient way to use this class is to statically import all of its methods, which allows usage like:

collection.createIndex(compoundIndex(ascending("x"), descending("y")))
Since

1.0

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Indexes
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Value Members

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def ascending(fieldNames: String*): Bson

    Permalink

    Create an index key for an ascending index on the given fields.

    Create an index key for an ascending index on the given fields.

    fieldNames

    the field names, which must contain at least one

    returns

    the index specification

    See also

    indexes

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def compoundIndex(indexes: Bson*): Bson

    Permalink

    create a compound index specifications.

    create a compound index specifications. If any field names are repeated, the last one takes precedence.

    indexes

    the index specifications

    returns

    the compound index specification

    See also

    compoundIndex

  8. def descending(fieldNames: String*): Bson

    Permalink

    Create an index key for an ascending index on the given fields.

    Create an index key for an ascending index on the given fields.

    fieldNames

    the field names, which must contain at least one

    returns

    the index specification

    See also

    indexes

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

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def geo2d(fieldName: String): Bson

    Permalink

    Create an index key for a 2d index on the given field.

    Create an index key for a 2d index on the given field.

    Note: A 2d index is for data stored as points on a two-dimensional plane. The 2d index is intended for legacy coordinate pairs used in MongoDB 2.2 and earlier.

    fieldName

    the field to create a 2d index on

    returns

    the index specification

    See also

    2d index

  13. def geo2dsphere(fieldNames: String*): Bson

    Permalink

    Create an index key for an 2dsphere index on the given fields.

    Create an index key for an 2dsphere index on the given fields.

    fieldNames

    the field names, which must contain at least one

    returns

    the index specification

    See also

    2dsphere Index

  14. def geoHaystack(fieldName: String, additional: Bson): Bson

    Permalink

    Create an index key for a geohaystack index on the given field.

    Create an index key for a geohaystack index on the given field.

    Note: For queries that use spherical geometry, a 2dsphere index is a better option than a haystack index. 2dsphere indexes allow field reordering; geoHaystack indexes require the first field to be the location field. Also, geoHaystack indexes are only usable via commands and so always return all results at once..

    fieldName

    the field to create a geoHaystack index on

    additional

    the additional field that forms the geoHaystack index key

    returns

    the index specification

    See also

    geoHaystack index

  15. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. def hashed(fieldName: String): Bson

    Permalink

    Create an index key for a hashed index on the given field.

    Create an index key for a hashed index on the given field.

    fieldName

    the field to create a hashed index on

    returns

    the index specification

    See also

    hashed index

  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def text(fieldName: String): Bson

    Permalink

    Create an index key for a text index on the given field.

    Create an index key for a text index on the given field.

    fieldName

    the field to create a text index on

    returns

    the index specification

    See also

    text index

  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped