case class Index(key: Seq[(String, IndexType)], name: Option[String] = None, unique: Boolean = false, background: Boolean = false, dropDups: Boolean = false, sparse: Boolean = false, version: Option[Int] = None, partialFilter: Option[BSONDocument] = None, options: BSONDocument = BSONDocument()) extends Product with Serializable
A MongoDB index (excluding the namespace).
Consider reading the documentation about indexes in MongoDB.
- key
The index key (it can be composed of multiple fields). This list should not be empty!
- name
The name of this index. If you provide none, a name will be computed for you.
- unique
Enforces uniqueness.
- background
States if this index should be built in background. You should read the documentation about background indexing before using it.
- dropDups
States if duplicates should be discarded (if unique = true). Warning: you should read the documentation.
- sparse
States if the index to build should only consider the documents that have the indexed fields. See the documentation on the consequences of such an index.
- version
Indicates the version of the index (1 for >= 2.0, else 0). You should let MongoDB decide.
- partialFilter
Optional partial filter (since MongoDB 3.2)
- options
Optional parameters for this index (typically specific to an IndexType like Geo2D).
- Alphabetic
- By Inheritance
- Index
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Index(key: Seq[(String, IndexType)], name: Option[String] = None, unique: Boolean = false, background: Boolean = false, dropDups: Boolean = false, sparse: Boolean = false, version: Option[Int] = None, partialFilter: Option[BSONDocument] = None, options: BSONDocument = BSONDocument())
- key
The index key (it can be composed of multiple fields). This list should not be empty!
- name
The name of this index. If you provide none, a name will be computed for you.
- unique
Enforces uniqueness.
- background
States if this index should be built in background. You should read the documentation about background indexing before using it.
- dropDups
States if duplicates should be discarded (if unique = true). Warning: you should read the documentation.
- sparse
States if the index to build should only consider the documents that have the indexed fields. See the documentation on the consequences of such an index.
- version
Indicates the version of the index (1 for >= 2.0, else 0). You should let MongoDB decide.
- partialFilter
Optional partial filter (since MongoDB 3.2)
- options
Optional parameters for this index (typically specific to an IndexType like Geo2D).
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Index, B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val background: Boolean
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val dropDups: Boolean
- def ensuring(cond: (Index) ⇒ Boolean, msg: ⇒ Any): Index
- def ensuring(cond: (Index) ⇒ Boolean): Index
- def ensuring(cond: Boolean, msg: ⇒ Any): Index
- def ensuring(cond: Boolean): Index
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
lazy val
eventualName: String
The name of the index (a default one is computed if none).
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val key: Seq[(String, IndexType)]
- val name: Option[String]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val options: BSONDocument
- val partialFilter: Option[BSONDocument]
- val sparse: Boolean
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val unique: Boolean
- val version: Option[Int]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def →[B](y: B): (Index, B)