NamedWriteable
, Writeable
, ToXContent
, ToXContentFragment
, BaseAggregationBuilder
public class SamplerAggregationBuilder extends AbstractAggregationBuilder<SamplerAggregationBuilder>
AggregationBuilder.CommonFields
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static int |
DEFAULT_SHARD_SAMPLE_SIZE |
|
static java.lang.String |
NAME |
metaData
factoriesBuilder, name
EMPTY_PARAMS
Modifier | Constructor | Description |
---|---|---|
|
SamplerAggregationBuilder(java.lang.String name) |
|
|
SamplerAggregationBuilder(StreamInput in) |
Read from a stream.
|
protected |
SamplerAggregationBuilder(SamplerAggregationBuilder clone,
AggregatorFactories.Builder factoriesBuilder,
java.util.Map<java.lang.String,java.lang.Object> metaData) |
Modifier and Type | Method | Description |
---|---|---|
protected SamplerAggregatorFactory |
doBuild(SearchContext context,
AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder) |
|
protected boolean |
doEquals(java.lang.Object obj) |
|
protected int |
doHashCode() |
|
protected void |
doWriteTo(StreamOutput out) |
|
java.lang.String |
getType() |
The name of the type of aggregation built by this builder.
|
protected XContentBuilder |
internalXContent(XContentBuilder builder,
ToXContent.Params params) |
|
static SamplerAggregationBuilder |
parse(java.lang.String aggregationName,
XContentParser parser) |
|
protected AggregationBuilder |
shallowCopy(AggregatorFactories.Builder factoriesBuilder,
java.util.Map<java.lang.String,java.lang.Object> metaData) |
Create a shallow copy of this builder and replacing
AggregationBuilder.factoriesBuilder and metaData . |
int |
shardSize() |
Get the max num docs to be returned from each shard.
|
SamplerAggregationBuilder |
shardSize(int shardSize) |
Set the max num docs to be returned from each shard.
|
build, equals, getMetaData, getWriteableName, hashCode, setMetaData, subAggregation, subAggregation, subAggregations, toXContent, writeTo
doRewrite, getName, getPipelineAggregations, getSubAggregations, rewrite, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isFragment
public static final java.lang.String NAME
public static final int DEFAULT_SHARD_SAMPLE_SIZE
public SamplerAggregationBuilder(java.lang.String name)
protected SamplerAggregationBuilder(SamplerAggregationBuilder clone, AggregatorFactories.Builder factoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metaData)
public SamplerAggregationBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
protected AggregationBuilder shallowCopy(AggregatorFactories.Builder factoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metaData)
AggregationBuilder
AggregationBuilder.factoriesBuilder
and metaData
.
Used by AggregationBuilder.rewrite(QueryRewriteContext)
.shallowCopy
in class AggregationBuilder
protected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class AbstractAggregationBuilder<SamplerAggregationBuilder>
java.io.IOException
public SamplerAggregationBuilder shardSize(int shardSize)
public int shardSize()
protected SamplerAggregatorFactory doBuild(SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException
doBuild
in class AbstractAggregationBuilder<SamplerAggregationBuilder>
java.io.IOException
protected XContentBuilder internalXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
internalXContent
in class AbstractAggregationBuilder<SamplerAggregationBuilder>
java.io.IOException
public static SamplerAggregationBuilder parse(java.lang.String aggregationName, XContentParser parser) throws java.io.IOException
java.io.IOException
protected int doHashCode()
doHashCode
in class AbstractAggregationBuilder<SamplerAggregationBuilder>
protected boolean doEquals(java.lang.Object obj)
doEquals
in class AbstractAggregationBuilder<SamplerAggregationBuilder>
public java.lang.String getType()
BaseAggregationBuilder