Class MovingFunctionScript

java.lang.Object
org.elasticsearch.search.aggregations.pipeline.MovingFunctionScript

public abstract class MovingFunctionScript
extends java.lang.Object
This class provides a custom script context for the Moving Function pipeline aggregation, so that we can expose a number of pre-baked moving functions like min, max, movavg, etc
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static interface  MovingFunctionScript.Factory  
  • Field Summary

    Fields
    Modifier and Type Field Description
    static ScriptContext<MovingFunctionScript.Factory> CONTEXT  
    static java.lang.String[] PARAMETERS  
  • Constructor Summary

    Constructors
    Constructor Description
    MovingFunctionScript()  
  • Method Summary

    Modifier and Type Method Description
    abstract double execute​(java.util.Map<java.lang.String,​java.lang.Object> params, double[] values)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • MovingFunctionScript

      public MovingFunctionScript()
  • Method Details

    • execute

      public abstract double execute​(java.util.Map<java.lang.String,​java.lang.Object> params, double[] values)
      Parameters:
      params - The user-provided parameters
      values - The values in the window that we are moving a function across
      Returns:
      A double representing the value from this particular window