Class FieldScript

org.elasticsearch.script.FieldScript

public abstract class FieldScript extends
A script to produce dynamic values for return fields.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     
    static interface 
    A factory to construct FieldScript instances.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The context used to compile FieldScript factories.
    static []
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
     
    <,​> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract
     
    The doc lookup for the Lucene segment this script was created for.
    The leaf lookup for the Lucene segment this script was created for.
    <,​>
    Return the parameters for this script.
    void
    setDocument​(int docid)
    Set the current document to run the script on next.

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Field Details

  • Constructor Details

    • FieldScript

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

      protected FieldScript()
  • Method Details

    • execute

      public abstract  execute()
    • getLeafLookup

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

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

      public final <,​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.