@Documented @Target(value={METHOD,FIELD}) @Retention(value=RUNTIME) @Repeatable(value=GenericField.List.class) public @interface GenericField
This is a generic annotation that will work for any type of field supported by the backend:
String, Integer, LocalDate, ...
Note that this annotation, being generic, does not offer configuration options
that are specific to only some types of fields.
Use more specific annotations if you want that kind of configuration.
For example, to define a tokenized (multi-word) text field, use FullTextField.
To define a non-tokenized (single-word), but normalized (lowercased, ...) text field, use KeywordField.
| Modifier and Type | Optional Element and Description |
|---|---|
Aggregable |
aggregable |
ContainerExtraction |
extraction |
String |
indexNullAs |
String |
name |
Projectable |
projectable |
Searchable |
searchable |
Sortable |
sortable |
ValueBinderRef |
valueBinder |
ValueBridgeRef |
valueBridge |
public abstract String name
public abstract Projectable projectable
public abstract Sortable sortable
public abstract Searchable searchable
Searchablepublic abstract Aggregable aggregable
Aggregablepublic abstract String indexNullAs
public abstract ValueBridgeRef valueBridge
valueBinder() is set.ValueBridgeRefpublic abstract ValueBinderRef valueBinder
valueBridge() is set.ValueBinderRefpublic abstract ContainerExtraction extraction
Map<TypeA, TypeB>:
defining the extraction as @ContainerExtraction(BuiltinContainerExtractors.MAP_KEY)
allows binding the field to the map keys instead of the map values.
By default, Hibernate Search will try to apply a set of extractors for common container types.ContainerExtractionCopyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.