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(String fieldName, Map<String,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, 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.
    • emitFromObject

      protected void emitFromObject(Object v)
      Specified by:
      emitFromObject in class AbstractFieldScript
    • emit

      public final void emit(double v)