Annotation Interface Indexed


@Target(FIELD) @Retention(RUNTIME) public @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 Elements
    Modifier and Type
    Required Element
    Description
    com.aerospike.client.query.IndexType
    Underlying data type of secondary index.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    If bin name is not provided, the annotated field name will be used.
    com.aerospike.client.query.IndexCollectionType
    Secondary 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 name
      If 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 bin
      If bin name is not provided, the annotated field name will be used.
      Default:
      ""
    • type

      com.aerospike.client.query.IndexType type
      Underlying data type of secondary index.
    • collectionType

      com.aerospike.client.query.IndexCollectionType collectionType
      Secondary index collection type.
      Default:
      DEFAULT
    • ctx

      String ctx
      Context 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:
      ""