Class HighlightBuilder.Field
- java.lang.Object
-
- org.elasticsearch.search.fetch.subphase.highlight.AbstractHighlighterBuilder<HighlightBuilder.Field>
-
- org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder.Field
-
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentObject
,Rewriteable<HighlightBuilder.Field>
- Enclosing class:
- HighlightBuilder
public static class HighlightBuilder.Field extends AbstractHighlighterBuilder<HighlightBuilder.Field>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.search.fetch.subphase.highlight.AbstractHighlighterBuilder
BOUNDARY_CHARS_FIELD, BOUNDARY_MAX_SCAN_FIELD, BOUNDARY_SCANNER_FIELD, BOUNDARY_SCANNER_LOCALE_FIELD, boundaryChars, boundaryMaxScan, boundaryScannerLocale, boundaryScannerType, ENCODER_FIELD, FIELDS_FIELD, FORCE_SOURCE_FIELD, forceSource, FRAGMENT_OFFSET_FIELD, FRAGMENT_SIZE_FIELD, fragmenter, FRAGMENTER_FIELD, fragmentSize, HIGHLIGHT_FILTER_FIELD, HIGHLIGHT_QUERY_FIELD, highlighterType, highlightFilter, highlightQuery, MATCHED_FIELDS_FIELD, NO_MATCH_SIZE_FIELD, noMatchSize, NUMBER_OF_FRAGMENTS_FIELD, numOfFragments, options, OPTIONS_FIELD, order, ORDER_FIELD, PHRASE_LIMIT_FIELD, phraseLimit, POST_TAGS_FIELD, postTags, PRE_TAGS_FIELD, preTags, REQUIRE_FIELD_MATCH_FIELD, requireFieldMatch, TYPE_FIELD
-
Fields inherited from interface org.elasticsearch.index.query.Rewriteable
MAX_REWRITE_ROUNDS
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description Field(java.lang.String name)
Field(StreamInput in)
Read from a stream.
-
Method Summary
Modifier and Type Method Description protected boolean
doEquals(HighlightBuilder.Field other)
fields only present in subclass should be checked for equality in the implementationprotected int
doHashCode()
fields only present in subclass should contribute to hashCode in the implementationprotected void
doWriteTo(StreamOutput out)
HighlightBuilder.Field
fragmentOffset(int fragmentOffset)
void
innerXContent(XContentBuilder builder)
HighlightBuilder.Field
matchedFields(java.lang.String... matchedFields)
Set the matched fields to highlight against this field data.java.lang.String
name()
HighlightBuilder.Field
rewrite(QueryRewriteContext ctx)
Rewrites this instance based on the provided context.-
Methods inherited from class org.elasticsearch.search.fetch.subphase.highlight.AbstractHighlighterBuilder
boundaryChars, boundaryChars, boundaryMaxScan, boundaryMaxScan, boundaryScannerLocale, boundaryScannerLocale, boundaryScannerType, boundaryScannerType, boundaryScannerType, equals, forceSource, forceSource, fragmenter, fragmenter, fragmentSize, fragmentSize, hashCode, highlighterType, highlighterType, highlightFilter, highlightFilter, highlightQuery, highlightQuery, noMatchSize, noMatchSize, numOfFragments, numOfFragments, options, options, order, order, order, phraseLimit, phraseLimit, postTags, postTags, preTags, preTags, requireFieldMatch, requireFieldMatch, toString, toXContent, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Constructor Detail
-
Field
public Field(java.lang.String name)
-
Field
public Field(StreamInput in) throws java.io.IOException
Read from a stream.- Throws:
java.io.IOException
-
-
Method Detail
-
doWriteTo
protected void doWriteTo(StreamOutput out) throws java.io.IOException
- Specified by:
doWriteTo
in classAbstractHighlighterBuilder<HighlightBuilder.Field>
- Throws:
java.io.IOException
-
name
public java.lang.String name()
-
fragmentOffset
public HighlightBuilder.Field fragmentOffset(int fragmentOffset)
-
matchedFields
public HighlightBuilder.Field matchedFields(java.lang.String... matchedFields)
Set the matched fields to highlight against this field data. Default to null, meaning just the named field. If you provide a list of fields here then don't forget to include name as it is not automatically included.
-
innerXContent
public void innerXContent(XContentBuilder builder) throws java.io.IOException
- Specified by:
innerXContent
in classAbstractHighlighterBuilder<HighlightBuilder.Field>
- Throws:
java.io.IOException
-
doHashCode
protected int doHashCode()
Description copied from class:AbstractHighlighterBuilder
fields only present in subclass should contribute to hashCode in the implementation- Specified by:
doHashCode
in classAbstractHighlighterBuilder<HighlightBuilder.Field>
-
doEquals
protected boolean doEquals(HighlightBuilder.Field other)
Description copied from class:AbstractHighlighterBuilder
fields only present in subclass should be checked for equality in the implementation- Specified by:
doEquals
in classAbstractHighlighterBuilder<HighlightBuilder.Field>
-
rewrite
public HighlightBuilder.Field rewrite(QueryRewriteContext ctx) throws java.io.IOException
Description copied from interface:Rewriteable
Rewrites this instance based on the provided context. The returned objects will be the same instance as this if no changes during the rewrite were applied.- Throws:
java.io.IOException
-
-