Annotation Interface Document


@Inherited @Retention(RUNTIME) @Target(TYPE) public @interface Document
Identifies a domain object to be persisted to Elasticsearch.
Author:
Rizwan Idrees, Mohsin Husen, Mason Chan, Ivan Greene, Mark Paluch, Peter-Josef Meisch, Sascha Woo
  • Element Details

    • indexName

      String indexName
      Name of the Elasticsearch index.
      • Lowercase only
      • Cannot include \, /, *, ?, ", >, <, |, ` ` (space character), ,, #
      • Cannot start with -, _, +
      • Cannot be . or ..
      • Cannot be longer than 255 bytes (note it is bytes, so multi-byte characters will count towards the 255 limit faster)
    • useServerConfiguration

      @Deprecated boolean useServerConfiguration
      Deprecated.
      since 4.2, use the Setting annotation to configure settings
      Use server-side settings when creating the index.
      Default:
      false
    • shards

      @Deprecated short shards
      Deprecated.
      since 4.2, use the Setting annotation to configure settings
      Number of shards for the index indexName(). Used for index creation.
      With version 4.0, the default value is changed from 5 to 1 to reflect the change in the default settings of Elasticsearch which changed to 1 as well in Elasticsearch 7.0. ComposableAnnotationsUnitTest.documentAnnotationShouldBeComposable:60
      Default:
      1
    • replicas

      @Deprecated short replicas
      Deprecated.
      since 4.2, use the Setting annotation to configure settings
      Number of replicas for the index indexName(). Used for index creation.
      Default:
      1
    • refreshInterval

      @Deprecated String refreshInterval
      Deprecated.
      since 4.2, use the Setting annotation to configure settings
      Refresh interval for the index indexName(). Used for index creation.
      Default:
      "1s"
    • indexStoreType

      @Deprecated String indexStoreType
      Deprecated.
      since 4.2, use the Setting annotation to configure settings
      Index storage type for the index indexName(). Used for index creation.
      Default:
      "fs"
    • createIndex

      boolean createIndex
      Configuration whether to create an index on repository bootstrapping.
      Default:
      true
    • versionType

      Configuration of version management.
      Default:
      EXTERNAL
    • writeTypeHint

      WriteTypeHint writeTypeHint
      Defines if type hints should be written. .
      Since:
      4.3
      Default:
      DEFAULT
    • dynamic

      Dynamic dynamic
      Controls how Elasticsearch dynamically adds fields to the document.
      Since:
      4.3
      Default:
      INHERIT