Annotation Type Field


@Retention(RUNTIME) @Target({METHOD,FIELD}) @Documented @Deprecated @Repeatable(Fields.class) @PropertyMapping(processor=@PropertyMappingAnnotationProcessorRef(type=org.hibernate.search.annotations.impl.FieldAnnotationProcessor.class,retrieval=CONSTRUCTOR)) public @interface Field
Deprecated.
Use Hibernate Search 6's field annotations instead:
  • FullTextField for text fields with an analyzer.
  • KeywordField for text fields with a normalizer.
  • GenericField for non-text fields.
Annotation used for marking a property as indexable.
Author:
Emmanuel Bernard, Hardy Ferentschik
  • Field Details

    • DO_NOT_INDEX_NULL

      static final String DO_NOT_INDEX_NULL
      Deprecated.
      Default value for the indexNullAs() parameter. Indicates that null values should not be indexed.
      See Also:
  • Element Details

    • name

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

      Store store
      Deprecated.
      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
      Deprecated.
      Returns:
      Returns a Index enum defining whether the value should be indexed or not. Defaults to Index.YES.
      Default:
      YES
    • analyze

      Analyze analyze
      Deprecated.
      Returns:
      Returns a Analyze enum defining whether the value should be analyzed or not. Defaults to Analyze.YES.
      Default:
      YES
    • norms

      Norms norms
      Deprecated.
      Returns:
      Returns a Norms enum defining whether the norms should be stored in the index or not. Defaults to Norms.YES.
      Default:
      YES
    • termVector

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

      Analyzer analyzer
      Deprecated.
      Returns:
      Returns the analyzer for the field. Defaults to the inherited analyzer. Must be empty if normalizer() is used.
      Default:
      @org.hibernate.search.annotations.Analyzer
    • normalizer

      Normalizer normalizer
      Deprecated.
      Returns:
      Returns the normalizer for the field. Defaults to none. Must be empty if analyzer() is used.
      Default:
      @org.hibernate.search.annotations.Normalizer
    • indexNullAs

      String indexNullAs
      Deprecated.
      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__"