@Documented @Target({METHOD,FIELD}) @Retention(RUNTIME) @Repeatable(List.class) @PropertyMapping(processor=@PropertyMappingAnnotationProcessorRef(type=org.hibernate.search.mapper.pojo.mapping.definition.annotation.processing.impl.FullTextFieldProcessor.class,retrieval=CONSTRUCTOR)) public @interface FullTextField
Maps a property to a full-text field in the index, potentially holding multiple tokens (words) of text.

Note that this annotation only creates tokenized (multi-word) text fields. As a result:

  • The field value (the value of your annotated property, or at least the value produced by your custom value bridge must be of type String
  • You must assign an analyzer when using this annotation
  • This annotation does not allow making the field sortable (analyzed fields cannot be sorted on)
  • This annotation does not allow making the field aggregable (analyzed fields cannot be aggregated on)

If you want to index a non-String value, use the GenericField annotation instead. If you want to index a String value, but don't want the field to be analyzed, or want it to be sortable or aggregable, use the KeywordField annotation instead.

  • Element Details

    • name

      String name
      Returns:
      The name of the index field.
      Default:
      ""
    • analyzer

      String analyzer
      Returns:
      A reference to the analyzer to use for this field. See the documentation of your backend to know how to define analyzers.
      Default:
      "default"
    • searchAnalyzer

      String searchAnalyzer
      Returns:
      A reference to a different analyzer, overriding the analyzer(), to use for query parameters at search time. If not defined, the same analyzer() will be used.

      As above, see the documentation of your backend to know how to define analyzers.

      Default:
      ""
    • norms

      Norms norms
      Returns:
      Whether index-time scoring information should be stored or not.
      See Also:
      Default:
      DEFAULT
    • termVector

      TermVector termVector
      Returns:
      The term vector storing strategy.
      See Also:
      Default:
      DEFAULT
    • projectable

      Projectable projectable
      Returns:
      Whether projections are enabled for this field.
      See Also:
      Default:
      DEFAULT
    • searchable

      Searchable searchable
      Returns:
      Whether this field should be searchable.
      See Also:
      Default:
      DEFAULT
    • highlightable

      Highlightable[] highlightable
      Returns:
      Whether this field can be highlighted, and if so which highlighter types can be applied to it.
      See Also:
      Default:
      {DEFAULT}
    • valueBridge

      ValueBridgeRef valueBridge
      Returns:
      A reference to the value bridge to use for this field. Must not be set if valueBinder() is set.
      See Also:
      Default:
      @org.hibernate.search.mapper.pojo.bridge.mapping.annotation.ValueBridgeRef
    • valueBinder

      ValueBinderRef valueBinder
      Returns:
      A reference to the value binder to use for this field. Must not be set if valueBridge() is set.
      See Also:
      Default:
      @org.hibernate.search.mapper.pojo.bridge.mapping.annotation.ValueBinderRef
    • extraction

      Returns:
      A definition of container extractors to be applied to the property allowing the binding of a value bridge to container elements. By default, Hibernate Search will try to apply a set of extractors for common container types.
      See Also:
      Default:
      @org.hibernate.search.mapper.pojo.extractor.mapping.annotation.ContainerExtraction