Class NumberSortScript

java.lang.Object
org.elasticsearch.script.NumberSortScript
All Implemented Interfaces:
ScorerAware

public abstract class NumberSortScript
extends java.lang.Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static interface  NumberSortScript.Factory
    A factory to construct stateful NumberSortScript factories for a specific index.
    static interface  NumberSortScript.LeafFactory
    A factory to construct NumberSortScript instances.
  • Field Summary

    Fields
    Modifier and Type Field Description
    static ScriptContext<NumberSortScript.Factory> CONTEXT  
    static java.lang.String[] PARAMETERS  
  • Constructor Summary

    Constructors
    Modifier Constructor Description
    protected NumberSortScript()  
      NumberSortScript​(java.util.Map<java.lang.String,​java.lang.Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)  
  • Method Summary

    Modifier and Type Method Description
    abstract double execute()  
    double get_score()
    Return the score of the current document.
    java.util.Map<java.lang.String,​ScriptDocValues<?>> getDoc()
    The doc lookup for the Lucene segment this script was created for.
    java.util.Map<java.lang.String,​java.lang.Object> getParams()
    Return the parameters for this script.
    void setDocument​(int docid)
    Set the current document to run the script on next.
    void setScorer​(org.apache.lucene.search.Scorable scorer)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • NumberSortScript

      public NumberSortScript​(java.util.Map<java.lang.String,​java.lang.Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)
    • NumberSortScript

      protected NumberSortScript()
  • Method Details

    • execute

      public abstract double execute()
    • getParams

      public java.util.Map<java.lang.String,​java.lang.Object> getParams()
      Return the parameters for this script.
    • setScorer

      public void setScorer​(org.apache.lucene.search.Scorable scorer)
      Specified by:
      setScorer in interface ScorerAware
    • get_score

      public double get_score()
      Return the score of the current document.
    • getDoc

      public java.util.Map<java.lang.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.