Class DocBasedScript

Direct Known Subclasses:
AbstractFieldScript, AggregationScript, FieldScript, FilterScript, NumberSortScript, ScoreScript, ScriptedMetricAggContexts.MapScript, StringSortScript

public abstract class DocBasedScript extends Object
  • Field Details

    • docReader

      protected final DocReader docReader
  • Constructor Details

    • DocBasedScript

      public DocBasedScript(DocReader docReader)
  • Method Details

    • field

      public Field field(String fieldName)
    • fields

      public Stream<Field> fields(String fieldGlob)
    • setDocument

      public void setDocument(int docID)
      Set the current document to run the script on next.
    • docAsMap

      public Map<String,Object> docAsMap()
    • getDoc

      public Map<String,ScriptDocValues<?>> getDoc()
      The doc lookup for the Lucene segment this script was created for.