java.lang.Object
org.elasticsearch.search.collapse.CollapseBuilder
- All Implemented Interfaces:
 Writeable,ToXContent,ToXContentObject
A builder that enables field collapsing on search request.
- 
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.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
FieldsModifier and TypeFieldDescriptionstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbuild(SearchExecutionContext searchExecutionContext) booleanstatic CollapseBuilderfromXContent(XContentParser parser) getField()The name of the field to collapse againstThe inner hit options to expand the collapsed resultsintReturns the amount of group requests that are allowed to be ran concurrently in the inner_hits phase.inthashCode()setInnerHits(List<InnerHitBuilder> innerHits) setInnerHits(InnerHitBuilder innerHit) setMaxConcurrentGroupRequests(int num) toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment 
- 
Field Details
- 
FIELD_FIELD
 - 
INNER_HITS_FIELD
 - 
MAX_CONCURRENT_GROUP_REQUESTS_FIELD
 
 - 
 - 
Constructor Details
- 
CollapseBuilder
Public constructor- Parameters:
 field- The name of the field to collapse on
 - 
CollapseBuilder
- Throws:
 IOException
 
 - 
 - 
Method Details
- 
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
 writeToin interfaceWriteable- Throws:
 IOException
 - 
fromXContent
 - 
setInnerHits
 - 
setInnerHits
 - 
setMaxConcurrentGroupRequests
 - 
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 IOException - Specified by:
 toXContentin interfaceToXContent- Throws:
 IOException
 - 
equals
 - 
hashCode
public int hashCode() - 
build
 
 -