public interface Highlighter
extends java.io.Serializable
| Modifier and Type | Interface and Description |
|---|---|
static class |
Highlighter.BoundaryScanner |
static class |
Highlighter.Encoder |
static interface |
Highlighter.Field |
static class |
Highlighter.Fragmenter |
static interface |
Highlighter.Highlight |
static class |
Highlighter.Order |
static class |
Highlighter.TagsSchema |
static class |
Highlighter.Type |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBoundaryChars()
Returns a string that contains each boundary character.
|
java.lang.Integer |
getBoundaryMaxScan()
Returns how far to scan for boundary characters.
|
Highlighter.BoundaryScanner |
getBoundaryScanner()
Returns how to break the highlighted fragments:
chars, sentence, or
word |
java.lang.String |
getBoundaryScannerLocale()
Returns the locale that is used to search for sentence and word boundaries.
|
Highlighter.Encoder |
getEncoder()
Returns if the snippet should be HTML encoded:
default (no encoding) or
html (HTML-escape the snippet text and then insert the highlighting tags) |
Highlighter.Fragmenter |
getFragmenter()
Returns how text should be broken up in highlight snippets:
simple or
span. |
java.lang.Integer |
getFragmentSize()
Returns the size of the highlighted fragment in characters.
|
Query |
getHighlightQuery() |
java.lang.Integer |
getNoMatchSize()
Returns the amount of text you want to return from the beginning of the field if there are no
matching fragments to highlight.
|
java.lang.Integer |
getNumberOfFragments()
Returns the maximum number of fragments to return.
|
Highlighter.Order |
getOrder() |
java.lang.Integer |
getPhraseLimit() |
default java.util.List<java.lang.String> |
getPostTags()
Returns a list of HTML tags to use after highlighted text.
|
default java.util.List<java.lang.String> |
getPreTags()
Returns a list of HTML tags to use before highlighted text.
|
Highlighter.TagsSchema |
getTagsSchema() |
Highlighter.Type |
getType() |
java.lang.Boolean |
isForceSource() |
java.lang.Boolean |
isHighlightFilter() |
java.lang.Boolean |
isRequireFieldMatch()
Returns true if only fields that contains a query match are highlighted.
|
java.lang.String getBoundaryChars()
.,!? \t\n.java.lang.Integer getBoundaryMaxScan()
Highlighter.BoundaryScanner getBoundaryScanner()
chars, sentence, or
wordjava.lang.String getBoundaryScannerLocale()
Highlighter.Encoder getEncoder()
default (no encoding) or
html (HTML-escape the snippet text and then insert the highlighting tags)Highlighter.Fragmenter getFragmenter()
simple or
span. Only valid for the plain highlighter.java.lang.Integer getFragmentSize()
Query getHighlightQuery()
java.lang.Integer getNoMatchSize()
java.lang.Integer getNumberOfFragments()
If the number of fragments is set to 0, no fragments are returned. Instead, the entire field contents are highlighted and returned. This can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required. If number_of_fragments is 0, fragment_size is ignored. Defaults to 5.
Highlighter.Order getOrder()
java.lang.Integer getPhraseLimit()
@Value.Default default java.util.List<java.lang.String> getPostTags()
getPreTags().@Value.Default default java.util.List<java.lang.String> getPreTags()
getPostTags().Highlighter.TagsSchema getTagsSchema()
Highlighter.Type getType()
java.lang.Boolean isForceSource()
java.lang.Boolean isHighlightFilter()
java.lang.Boolean isRequireFieldMatch()