Class FieldScript

java.lang.Object
org.elasticsearch.script.FieldScript

public abstract class FieldScript extends Object
A script to produce dynamic values for return fields.
  • Field Details

  • Constructor Details

    • FieldScript

      public FieldScript(Map<String,Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)
    • FieldScript

      protected FieldScript()
  • Method Details

    • execute

      public abstract Object execute()
    • getLeafLookup

      protected final LeafSearchLookup getLeafLookup()
      The leaf lookup for the Lucene segment this script was created for.
    • getParams

      public Map<String,Object> getParams()
      Return the parameters for this script.
    • getDoc

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

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