public class HighlighterParseElement extends Object implements SearchParseElement
highlight : {
tags_schema : "styled",
pre_tags : ["tag1", "tag2"],
post_tags : ["tag1", "tag2"],
order : "score",
highlight_filter : true,
fields : {
field1 : { },
field2 : { fragment_size : 100, number_of_fragments : 2 },
field3 : { number_of_fragments : 5, order : "simple", tags_schema : "styled" },
field4 : { number_of_fragments: 0, pre_tags : ["openingTagA", "openingTagB"], post_tags : ["closingTag"] }
}
}
| Constructor and Description |
|---|
HighlighterParseElement() |
| Modifier and Type | Method and Description |
|---|---|
SearchContextHighlight |
parse(XContentParser parser,
IndexQueryParserService queryParserService) |
void |
parse(XContentParser parser,
SearchContext context) |
protected org.elasticsearch.search.highlight.SearchContextHighlight.FieldOptions.Builder |
parseFields(XContentParser parser,
IndexQueryParserService queryParserService) |
public void parse(XContentParser parser, SearchContext context) throws Exception
parse in interface SearchParseElementExceptionpublic SearchContextHighlight parse(XContentParser parser, IndexQueryParserService queryParserService) throws IOException
IOExceptionprotected org.elasticsearch.search.highlight.SearchContextHighlight.FieldOptions.Builder parseFields(XContentParser parser, IndexQueryParserService queryParserService) throws IOException
IOExceptionCopyright © 2009–2017. All rights reserved.