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 theKeywordField
annotation instead. - The field value (the value of your annotated property, or at least the value produced by your custom
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
analyzer
ContainerExtraction
extraction
String
name
Norms
norms
Projectable
projectable
Searchable
searchable
String
searchAnalyzer
TermVector
termVector
ValueBinderRef
valueBinder
ValueBridgeRef
valueBridge
-
-
-
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 sameanalyzer()
will be used.As above, see the documentation of your backend to know how to define analyzers.
- Default:
- ""
-
-
-
termVector
TermVector termVector
- Returns:
- The term vector storing strategy.
- See Also:
TermVector
- Default:
- org.hibernate.search.engine.backend.types.TermVector.DEFAULT
-
-
-
projectable
Projectable projectable
- Returns:
- Whether projections are enabled for this field.
- See Also:
GenericField.projectable()
,Projectable
- Default:
- org.hibernate.search.engine.backend.types.Projectable.DEFAULT
-
-
-
searchable
Searchable searchable
- Returns:
- Whether this field should be searchable.
- See Also:
GenericField.sortable()
,Searchable
- Default:
- org.hibernate.search.engine.backend.types.Searchable.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:
GenericField.valueBridge()
,ValueBridgeRef
- 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:
GenericField.valueBinder()
,ValueBinderRef
- Default:
- @org.hibernate.search.mapper.pojo.bridge.mapping.annotation.ValueBinderRef
-
-
-
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
-
-