Annotation Type Field


@Retention(RUNTIME) @Target({METHOD,FIELD}) @Documented public @interface Field
Annotation used for marking a property as indexable.
  • Field Details

  • Element Details

    • name

      String name
      Returns:
      Returns the field name. Defaults to the JavaBean property name.
      Default:
      ""
    • store

      Store store
      Returns:
      Returns a Store enum type indicating whether the value should be stored in the document. Defaults to Store.NO.
      Default:
      NO
    • index

      Index index
      Returns:
      Returns a Index enum defining how the value should be indexed. Defaults to Index.TOKENIZED.
      Default:
      TOKENIZED
    • termVector

      TermVector termVector
      Returns:
      Returns a TermVector enum defining if and how term vectors are stored. Defaults to TermVector.NO.
      Default:
      NO
    • analyzer

      Analyzer analyzer
      Returns:
      Returns the analyzer for the field. Defaults to the inherited analyzer.
      Default:
      @org.hibernate.search.annotations.Analyzer
    • boost

      Boost boost
      Returns:
      Returns the boost factor for the field. Default boost factor is 1.0.
      Default:
      @org.hibernate.search.annotations.Boost(1.0f)
    • bridge

      FieldBridge bridge
      Returns:
      Returns the field bridge used for this field. Default is autowired.
      Default:
      @org.hibernate.search.annotations.FieldBridge
    • indexNullAs

      String indexNullAs
      Returns:
      Returns the value to be used for indexing null. Per default Field.NO_NULL_INDEXING is returned indicating that null values are not indexed.
      Default:
      "__DO_NOT_INDEX_NULL__"