Package dev.morphia.annotations
Annotation Type Indexed
-
@Documented @Inherited @Retention(RUNTIME) @Target(FIELD) public @interface IndexedSpecified on fields that should be Indexed.- Author:
- Scott Hernandez
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanbackgroundDeprecated.use theIndexOptionsfound inoptions()booleandropDupsDeprecated.Support for this has been removed from the server.intexpireAfterSecondsDeprecated.use theIndexOptionsfound inoptions()java.lang.StringnameDeprecated.use theIndexOptionsfound inoptions()IndexOptionsoptionsbooleansparseDeprecated.use theIndexOptionsfound inoptions()booleanuniqueDeprecated.use theIndexOptionsfound inoptions()dev.morphia.utils.IndexDirectionvalue
-
-
-
Element Detail
-
options
IndexOptions options
- Returns:
- Options to apply to the index. Use of this field will ignore any of the deprecated options defined on
Indexdirectly.
- Default:
- @dev.morphia.annotations.IndexOptions
-
-
-
background
@Deprecated boolean background
Deprecated.use theIndexOptionsfound inoptions()- Returns:
- if true, creates the index in the background if true
- Default:
- false
-
-
-
expireAfterSeconds
@Deprecated int expireAfterSeconds
Deprecated.use theIndexOptionsfound inoptions()- Returns:
- the time to live for documents in the collection
- Default:
- -1
-
-
-
name
@Deprecated java.lang.String name
Deprecated.use theIndexOptionsfound inoptions()- Returns:
- 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...)
- Default:
- ""
-
-
-
sparse
@Deprecated boolean sparse
Deprecated.use theIndexOptionsfound inoptions()- Returns:
- if true, create the index with the sparse option
- Default:
- false
-
-
-
unique
@Deprecated boolean unique
Deprecated.use theIndexOptionsfound inoptions()- Returns:
- if true, creates the index as a unique value index; inserting duplicates values in this field will cause errors
- Default:
- false
-
-