Class AbstractLongFieldScript

Direct Known Subclasses:
DateFieldScript, GeoPointFieldScript, LongFieldScript

public abstract class AbstractLongFieldScript extends AbstractFieldScript
Common base class for script field scripts that return long values.
  • Constructor Details

    • AbstractLongFieldScript

      public AbstractLongFieldScript(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, LongConsumer consumer)
      Execute the script for the provided docId, passing results to the consumer
    • values

      public final long[] 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(long v)