Annotation Type FullTextField


  • @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, use the KeywordField annotation instead.

    • Element Detail

      • 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:
        Norms
        Default:
        org.hibernate.search.engine.backend.types.Norms.DEFAULT
      • termVector

        TermVector termVector
        Returns:
        The term vector storing strategy.
        See Also:
        TermVector
        Default:
        org.hibernate.search.engine.backend.types.TermVector.DEFAULT
      • extraction

        ContainerExtraction 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:
        GenericField.extraction()
        Default:
        @org.hibernate.search.mapper.pojo.extractor.mapping.annotation.ContainerExtraction