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
,Rewriteable<PipelineAggregationBuilder>
,BaseAggregationBuilder
,ToXContent
,ToXContentFragment
public class MovAvgPipelineAggregationBuilder
extends AbstractPipelineAggregationBuilder<MovAvgPipelineAggregationBuilder>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
PipelineAggregationBuilder.ValidationContext
Nested classes/interfaces inherited from interface org.elasticsearch.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.aggregations.pipeline.AbstractPipelineAggregationBuilder
BUCKETS_PATH_FIELD, metadata, type
Fields inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
bucketsPaths, name
Fields inherited from interface org.elasticsearch.index.query.Rewriteable
MAX_REWRITE_ROUNDS
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionMovAvgPipelineAggregationBuilder
(String name, String bucketsPath) Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionprotected PipelineAggregator
createInternal
(Map<String, Object> metadata) protected void
doWriteTo
(StreamOutput out) boolean
format()
Gets the format to use on the output of this aggregation.Sets the format to use on the output of this aggregation.protected DocValueFormat
Gets the GapPolicy to use on the output of this aggregation.gapPolicy
(BucketHelpers.GapPolicy gapPolicy) Sets the GapPolicy to use on the output of this aggregation.Returns the name of the writeable objectint
hashCode()
protected XContentBuilder
internalXContent
(XContentBuilder builder, ToXContent.Params params) minimize()
Gets whether the model should be fit to the data using a cost minimizing algorithm.minimize
(boolean minimize) Sets whether the model should be fit to the data using a cost minimizing algorithm.model()
Gets a MovAvgModel for the Moving Average.model
(MovAvgModel model) Sets a MovAvgModel for the Moving Average.modelBuilder
(MovAvgModelBuilder model) Sets a MovAvgModel for the Moving Average.parse
(ParseFieldRegistry<MovAvgModel.AbstractModelParser> movingAverageMdelParserRegistry, String pipelineAggregatorName, XContentParser parser) int
predict()
Gets the number of predictions that should be returned.predict
(int predict) Sets the number of predictions that should be returned.protected void
Makes sure this builder is properly configured.int
window()
Gets the window size for the moving average.window
(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, writeTo
Methods inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
getBucketsPaths, getName, rewrite, subAggregations, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
NAME
- See Also:
-
SETTINGS
-
-
Constructor Details
-
MovAvgPipelineAggregationBuilder
-
MovAvgPipelineAggregationBuilder
Read from a stream.- Throws:
IOException
-
-
Method Details
-
doWriteTo
- Specified by:
doWriteTo
in classAbstractPipelineAggregationBuilder<MovAvgPipelineAggregationBuilder>
- Throws:
IOException
-
format
Sets the format to use on the output of this aggregation. -
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
Gets whether the model should be fit to the data using a cost minimizing algorithm. -
createInternal
- Specified by:
createInternal
in classAbstractPipelineAggregationBuilder<MovAvgPipelineAggregationBuilder>
-
validate
Description copied from class:PipelineAggregationBuilder
Makes sure this builder is properly configured.- Specified by:
validate
in classPipelineAggregationBuilder
-
internalXContent
protected XContentBuilder internalXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
internalXContent
in classAbstractPipelineAggregationBuilder<MovAvgPipelineAggregationBuilder>
- Throws:
IOException
-
parse
public static MovAvgPipelineAggregationBuilder parse(ParseFieldRegistry<MovAvgModel.AbstractModelParser> movingAverageMdelParserRegistry, String pipelineAggregatorName, XContentParser parser) throws IOException - Throws:
IOException
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractPipelineAggregationBuilder<MovAvgPipelineAggregationBuilder>
-
equals
- Overrides:
equals
in classAbstractPipelineAggregationBuilder<MovAvgPipelineAggregationBuilder>
-
getWriteableName
Description copied from interface:NamedWriteable
Returns the name of the writeable object
-