@Documented @Inherited @Retention(value=RUNTIME) @Target(value=FIELD) public @interface Indexed
Modifier and Type | Optional Element and Description |
---|---|
boolean |
background
Create the index in the background?
|
boolean |
dropDups
Tells the unique index to drop duplicates silently when creating; only the first will be kept
|
int |
expireAfterSeconds
defines the time to live for documents in the collection
|
String |
name
The name of the index to create; default is to let the mongodb create a name (in the form of key1_1/-1_key2_1/-1...)
|
boolean |
sparse
Create the index with the sparse option
|
boolean |
unique
Creates the index as a unique value index; inserting duplicates values in this field will cause errors
|
IndexDirection |
value
Indicates the direction of the index (ascending, descending, or both; default is ascending
|
public abstract IndexDirection value
public abstract String name
public abstract boolean unique
Copyright © 2016. All rights reserved.