Class MovAvgPipelineAggregationBuilder
java.lang.Object
org.elasticsearch.search.aggregations.PipelineAggregationBuilder
org.elasticsearch.search.aggregations.pipeline.AbstractPipelineAggregationBuilder<MovAvgPipelineAggregationBuilder>
org.elasticsearch.search.aggregations.pipeline.MovAvgPipelineAggregationBuilder
- All Implemented Interfaces:
NamedWriteable,Writeable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentFragment,Rewriteable<PipelineAggregationBuilder>,BaseAggregationBuilder
public class MovAvgPipelineAggregationBuilder extends AbstractPipelineAggregationBuilder<MovAvgPipelineAggregationBuilder>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
PipelineAggregationBuilder.ValidationContextNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.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 java.lang.StringNAMEstatic org.elasticsearch.common.ParseFieldSETTINGSFields inherited from class org.elasticsearch.search.aggregations.pipeline.AbstractPipelineAggregationBuilder
BUCKETS_PATH_FIELD, metadata, typeFields inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
bucketsPaths, name -
Constructor Summary
Constructors Constructor Description MovAvgPipelineAggregationBuilder(java.lang.String name, java.lang.String bucketsPath)MovAvgPipelineAggregationBuilder(StreamInput in)Read from a stream. -
Method Summary
Modifier and Type Method Description protected PipelineAggregatorcreateInternal(java.util.Map<java.lang.String,java.lang.Object> metadata)protected voiddoWriteTo(StreamOutput out)booleanequals(java.lang.Object obj)java.lang.Stringformat()Gets the format to use on the output of this aggregation.MovAvgPipelineAggregationBuilderformat(java.lang.String format)Sets the format to use on the output of this aggregation.protected DocValueFormatformatter()BucketHelpers.GapPolicygapPolicy()Gets the GapPolicy to use on the output of this aggregation.MovAvgPipelineAggregationBuildergapPolicy(BucketHelpers.GapPolicy gapPolicy)Sets the GapPolicy to use on the output of this aggregation.java.lang.StringgetWriteableName()Returns the name of the writeable objectinthashCode()protected org.elasticsearch.common.xcontent.XContentBuilderinternalXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)java.lang.Booleanminimize()Gets whether the model should be fit to the data using a cost minimizing algorithm.MovAvgPipelineAggregationBuilderminimize(boolean minimize)Sets whether the model should be fit to the data using a cost minimizing algorithm.MovAvgModelmodel()Gets a MovAvgModel for the Moving Average.MovAvgPipelineAggregationBuildermodel(MovAvgModel model)Sets a MovAvgModel for the Moving Average.MovAvgPipelineAggregationBuildermodelBuilder(MovAvgModelBuilder model)Sets a MovAvgModel for the Moving Average.static MovAvgPipelineAggregationBuilderparse(ParseFieldRegistry<MovAvgModel.AbstractModelParser> movingAverageMdelParserRegistry, java.lang.String pipelineAggregatorName, org.elasticsearch.common.xcontent.XContentParser parser)intpredict()Gets the number of predictions that should be returned.MovAvgPipelineAggregationBuilderpredict(int predict)Sets the number of predictions that should be returned.protected voidvalidate(PipelineAggregationBuilder.ValidationContext context)Makes sure this builder is properly configured.intwindow()Gets the window size for the moving average.MovAvgPipelineAggregationBuilderwindow(int window)Sets the window size for the moving average.Methods inherited from class org.elasticsearch.search.aggregations.pipeline.AbstractPipelineAggregationBuilder
create, getType, overrideBucketsPath, setMetadata, toXContent, type, writeToMethods inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
getBucketsPaths, getName, rewrite, subAggregations, toString
-
Field Details
-
NAME
public static final java.lang.String NAME- See Also:
- Constant Field Values
-
SETTINGS
public static final org.elasticsearch.common.ParseField SETTINGS
-
-
Constructor Details
-
MovAvgPipelineAggregationBuilder
public MovAvgPipelineAggregationBuilder(java.lang.String name, java.lang.String bucketsPath) -
MovAvgPipelineAggregationBuilder
Read from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
doWriteTo
- Specified by:
doWriteToin classAbstractPipelineAggregationBuilder<MovAvgPipelineAggregationBuilder>- Throws:
java.io.IOException
-
format
Sets the format to use on the output of this aggregation. -
format
public java.lang.String format()Gets the format to use on the output of this aggregation. -
gapPolicy
Sets the GapPolicy to use on the output of this aggregation. -
gapPolicy
Gets the GapPolicy to use on the output of this aggregation. -
formatter
-
window
Sets the window size for the moving average. This window will "slide" across the series, and the values inside that window will be used to calculate the moving avg value- Parameters:
window- Size of window
-
window
public int window()Gets the window size for the moving average. This window will "slide" across the series, and the values inside that window will be used to calculate the moving avg value -
modelBuilder
Sets a MovAvgModel for the Moving Average. The model is used to define what type of moving average you want to use on the series- Parameters:
model- A MovAvgModel which has been prepopulated with settings
-
model
Sets a MovAvgModel for the Moving Average. The model is used to define what type of moving average you want to use on the series- Parameters:
model- A MovAvgModel which has been prepopulated with settings
-
model
Gets a MovAvgModel for the Moving Average. The model is used to define what type of moving average you want to use on the series -
predict
Sets the number of predictions that should be returned. Each prediction will be spaced at the intervals specified in the histogram. E.g "predict: 2" will return two new buckets at the end of the histogram with the predicted values.- Parameters:
predict- Number of predictions to make
-
predict
public int predict()Gets the number of predictions that should be returned. Each prediction will be spaced at the intervals specified in the histogram. E.g "predict: 2" will return two new buckets at the end of the histogram with the predicted values. -
minimize
Sets whether the model should be fit to the data using a cost minimizing algorithm.- Parameters:
minimize- If the model should be fit to the underlying data
-
minimize
public java.lang.Boolean minimize()Gets whether the model should be fit to the data using a cost minimizing algorithm. -
createInternal
protected PipelineAggregator createInternal(java.util.Map<java.lang.String,java.lang.Object> metadata)- Specified by:
createInternalin classAbstractPipelineAggregationBuilder<MovAvgPipelineAggregationBuilder>
-
validate
Description copied from class:PipelineAggregationBuilderMakes sure this builder is properly configured.- Specified by:
validatein classPipelineAggregationBuilder
-
internalXContent
protected org.elasticsearch.common.xcontent.XContentBuilder internalXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
internalXContentin classAbstractPipelineAggregationBuilder<MovAvgPipelineAggregationBuilder>- Throws:
java.io.IOException
-
parse
public static MovAvgPipelineAggregationBuilder parse(ParseFieldRegistry<MovAvgModel.AbstractModelParser> movingAverageMdelParserRegistry, java.lang.String pipelineAggregatorName, org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException- Throws:
java.io.IOException
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractPipelineAggregationBuilder<MovAvgPipelineAggregationBuilder>
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classAbstractPipelineAggregationBuilder<MovAvgPipelineAggregationBuilder>
-
getWriteableName
public java.lang.String getWriteableName()Description copied from interface:NamedWriteableReturns the name of the writeable object
-