Class CollapseBuilder
java.lang.Object
org.elasticsearch.search.collapse.CollapseBuilder
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
public class CollapseBuilder extends java.lang.Object implements Writeable, ToXContentObject
A builder that enables field collapsing on search request.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields Modifier and Type Field Description static ParseFieldFIELD_FIELDstatic ParseFieldINNER_HITS_FIELDstatic ParseFieldMAX_CONCURRENT_GROUP_REQUESTS_FIELD -
Constructor Summary
Constructors Constructor Description CollapseBuilder(java.lang.String field)Public constructorCollapseBuilder(StreamInput in) -
Method Summary
Modifier and Type Method Description CollapseContextbuild(QueryShardContext queryShardContext)booleanequals(java.lang.Object o)static CollapseBuilderfromXContent(XContentParser parser)java.lang.StringgetField()The name of the field to collapse againstjava.util.List<InnerHitBuilder>getInnerHits()The inner hit options to expand the collapsed resultsintgetMaxConcurrentGroupRequests()Returns the amount of group requests that are allowed to be ran concurrently in the inner_hits phase.inthashCode()CollapseBuildersetInnerHits(java.util.List<InnerHitBuilder> innerHits)CollapseBuildersetInnerHits(InnerHitBuilder innerHit)CollapseBuildersetMaxConcurrentGroupRequests(int num)XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)voidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
Field Details
-
Constructor Details
-
CollapseBuilder
public CollapseBuilder(java.lang.String field)Public constructor- Parameters:
field- The name of the field to collapse on
-
CollapseBuilder
- Throws:
java.io.IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput. -
fromXContent
-
setInnerHits
-
setInnerHits
-
setMaxConcurrentGroupRequests
-
getField
public java.lang.String getField()The name of the field to collapse against -
getInnerHits
The inner hit options to expand the collapsed results -
getMaxConcurrentGroupRequests
public int getMaxConcurrentGroupRequests()Returns the amount of group requests that are allowed to be ran concurrently in the inner_hits phase. -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
build
-