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
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Name of the Elasticsearch index.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    If true, the index mapping will be written on repository bootstrapping even when the index already exists.
    boolean
    Configuration whether to create an index on repository bootstrapping.
    Controls how Elasticsearch dynamically adds fields to the document.
    boolean
    Specifies if the id property should also be stored in the Elasticsearch document source.
    boolean
    Specifies if the version property should also be stored in the Elasticsearch document source.
    Configuration of version management.
    Defines if type hints should be written.
  • 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)
    • createIndex

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

      boolean alwaysWriteMapping
      If true, the index mapping will be written on repository bootstrapping even when the index already exists. This allows for automatically updating the mapping with new properties. Changes on existing properties will lead to an error from the Elasticsearch server.
      Default:
      false
    • 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
    • storeIdInSource

      boolean storeIdInSource
      Specifies if the id property should also be stored in the Elasticsearch document source. Default value is true
      Since:
      5.1
      Default:
      true
    • storeVersionInSource

      boolean storeVersionInSource
      Specifies if the version property should also be stored in the Elasticsearch document source. Default value is true.
      Since:
      5.1
      Default:
      true