Annotation Interface Indexed
Marks a field to be indexed using Aerospike's secondary index. This will make spring-data-aerospike create index on
application's startup.
For more details on Secondary index feature please refer to Aerospike Secondary index and to indexed-annotation.
- Author:
- Taras Danylchuk
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptioncom.aerospike.client.query.IndexTypeUnderlying data type of secondary index. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionIf bin name is not provided, the annotated field name will be used.com.aerospike.client.query.IndexCollectionTypeSecondary index collection type.Context is provided using the following DSL.If not set, name will be automatically generated with pattern {setName}_{fieldName}_lowercase{type}_lowercase{collectionType}.
-
Element Details
-
name
String nameIf not set, name will be automatically generated with pattern {setName}_{fieldName}_lowercase{type}_lowercase{collectionType}.Allows the actual value to be set using standard Spring property sources mechanism. Syntax is the same as for
PropertyResolver.resolveRequiredPlaceholders(String). SpEL is NOT supported.- Default:
""
-
bin
String binIf bin name is not provided, the annotated field name will be used.- Default:
""
-
type
com.aerospike.client.query.IndexType typeUnderlying data type of secondary index. -
collectionType
com.aerospike.client.query.IndexCollectionType collectionTypeSecondary index collection type.- Default:
DEFAULT
-
ctx
String ctxContext is provided using the following DSL.
a Map key “a” "a" Map key “a” "1" Map key (String) “1” 1 Map key (int) 1 {1} Map index 1 {=1} Map value (int) 1 {=bb} Map value “bb” {="1"} Map value (String) “1” {#1} Map rank 1 [1] List index 1 [=1] List value 1 [#1] List rank 1
Examples of complex contexts:a.aa.aaa [mapKey("a"), mapKey("aa"), mapKey("aaa")] a.55 [mapKey("a"), mapKey(55)] a.aa.{=222} [mapKey("a"), mapKey("aa"),mapValue(222)] ab.cd.[-1]."10" [mapKey("ab"), mapKey("cd"),listIndex(-1), mapKey("10")] - Default:
""
-