@Value.Immutable(copy=false) public static interface Highlighter.Field extends Highlighter
Highlighter.BoundaryScanner, Highlighter.Encoder, Highlighter.Field, Highlighter.Fragmenter, Highlighter.Highlight, Highlighter.Order, Highlighter.TagsSchema, Highlighter.Type| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer |
getFragmentOffset()
Returns the margin from which you want to start highlighting.
|
default java.util.List<java.lang.String> |
getMatchedFields()
Returns a list of fields whose matches are combined to highlight a single field.
|
java.lang.String |
getName()
Returns the field name to retrieve highlights for.
|
static Highlighter.Field |
of(java.lang.String name) |
getBoundaryChars, getBoundaryMaxScan, getBoundaryScanner, getBoundaryScannerLocale, getEncoder, getFragmenter, getFragmentSize, getHighlightQuery, getNoMatchSize, getNumberOfFragments, getOrder, getPhraseLimit, getPostTags, getPreTags, getTagsSchema, getType, isForceSource, isHighlightFilter, isRequireFieldMatchstatic Highlighter.Field of(java.lang.String name)
java.lang.Integer getFragmentOffset()
@Value.Default default java.util.List<java.lang.String> getMatchedFields()
This is most intuitive for multifields that analyze the same string in different ways.
All matched_fields must have term_vector set to
with_positions_offsets, but only the field to which the matches are combined
is loaded so only that field benefits from having store set to yes. Only valid for the
fvh highlighter.
java.lang.String getName()
You can use wildcards to specify fields. For example, you could specify comment_* to get highlights for all text and keyword fields that start with comment_.