Class DoubleFieldScript

java.lang.Object
org.elasticsearch.script.AbstractFieldScript
org.elasticsearch.script.DoubleFieldScript

public abstract class DoubleFieldScript
extends AbstractFieldScript
  • Field Details

  • Constructor Details

    • DoubleFieldScript

      public DoubleFieldScript​(java.lang.String fieldName, java.util.Map<java.lang.String,​java.lang.Object> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx)
  • Method Details

    • runForDoc

      public final void runForDoc​(int docId)
      Execute the script for the provided docId.
    • runForDoc

      public final void runForDoc​(int docId, java.util.function.DoubleConsumer consumer)
      Execute the script for the provided docId, passing results to the consumer
    • values

      public final double[] values()
      Values from the last time runForDoc(int) was called. This array is mutable and will change with the next call of runForDoc(int). It is also oversized and will contain garbage at all indices at and above count().
    • count

      public final int count()
      The number of results produced the last time runForDoc(int) was called.
    • emit

      public final void emit​(double v)