|
Spring Data MongoDB - Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value=FIELD) @Retention(value=RUNTIME) public @interface Indexed
Mark a field to be indexed using MongoDB's indexing feature.
| Optional Element Summary | |
|---|---|
boolean |
background
If true the index will be created in the background. |
String |
collection
Colleciton name for index to be created on. |
IndexDirection |
direction
|
boolean |
dropDups
|
int |
expireAfterSeconds
Configures the number of seconds after which the collection should expire. |
String |
name
Index name. |
boolean |
sparse
If set to true index will skip over any document that is missing the indexed field. |
boolean |
unique
If set to true reject all documents that contain a duplicate value for the indexed field. |
boolean |
useGeneratedName
If set to true then MongoDB will ignore the given index name and instead generate a new name. |
public abstract boolean unique
http://docs.mongodb.org/manual/core/index-unique/public abstract IndexDirection direction
public abstract boolean sparse
http://docs.mongodb.org/manual/core/index-sparse/public abstract boolean dropDups
http://docs.mongodb.org/manual/core/index-creation/#index-creation-duplicate-droppingpublic abstract String name
public abstract boolean useGeneratedName
public abstract String collection
public abstract boolean background
http://docs.mongodb.org/manual/core/indexes/#background-constructionpublic abstract int expireAfterSeconds
http://docs.mongodb.org/manual/tutorial/expire-data/
|
Spring Data MongoDB - Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||