Class ScoreScript


  • public abstract class ScoreScript
    extends java.lang.Object
    A script used for adjusting the score on a per document basis.
    • Constructor Summary

      Constructors 
      Constructor Description
      ScoreScript​(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()  
      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.Scorer scorer)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScoreScript

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

      • execute

        public abstract double execute()
      • getParams

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

        public final 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.
      • setScorer

        public void setScorer​(org.apache.lucene.search.Scorer scorer)
      • get_score

        public double get_score()