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
- Alphabetic
- By Inheritance
- Indexes
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
ascending(fieldNames: String*): Bson
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
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
def
compoundIndex(indexes: Bson*): Bson
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
-
def
descending(fieldNames: String*): Bson
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
geo2d(fieldName: String): Bson
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
-
def
geo2dsphere(fieldNames: String*): Bson
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
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashed(fieldName: String): Bson
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
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
text(fieldName: String): Bson
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
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated