Class ScriptScoreQuery

java.lang.Object
org.apache.lucene.search.Query
org.elasticsearch.common.lucene.search.function.ScriptScoreQuery

public class ScriptScoreQuery extends org.apache.lucene.search.Query
A query that uses a script to compute documents' scores.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ScriptScoreQuery(org.apache.lucene.search.Query subQuery, Script script, ScoreScript.LeafFactory scriptBuilder, Float minScore, String indexName, int shardId, Version indexVersion)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.lucene.search.Weight
    createWeight(org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.search.ScoreMode scoreMode, float boost)
     
    boolean
     
    int
     
    org.apache.lucene.search.Query
    rewrite(org.apache.lucene.index.IndexReader reader)
     
     
    void
    visit(org.apache.lucene.search.QueryVisitor visitor)
     

    Methods inherited from class org.apache.lucene.search.Query

    classHash, sameClassAs, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • rewrite

      public org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader) throws IOException
      Overrides:
      rewrite in class org.apache.lucene.search.Query
      Throws:
      IOException
    • createWeight

      public org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.search.ScoreMode scoreMode, float boost) throws IOException
      Overrides:
      createWeight in class org.apache.lucene.search.Query
      Throws:
      IOException
    • visit

      public void visit(org.apache.lucene.search.QueryVisitor visitor)
      Overrides:
      visit in class org.apache.lucene.search.Query
    • toString

      public String toString(String field)
      Specified by:
      toString in class org.apache.lucene.search.Query
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in class org.apache.lucene.search.Query
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class org.apache.lucene.search.Query