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
ConstructorDescriptionScriptScoreQuery(org.apache.lucene.search.Query subQuery, Script script, ScoreScript.LeafFactory scriptBuilder, Float minScore, String indexName, int shardId, Version indexVersion)
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.search.Weight
createWeight(org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.search.ScoreMode scoreMode, float boost)
boolean
int
hashCode()
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
-
Constructor Details
-
ScriptScoreQuery
public ScriptScoreQuery(org.apache.lucene.search.Query subQuery, Script script, ScoreScript.LeafFactory scriptBuilder, Float minScore, String indexName, int shardId, Version indexVersion)
-
-
Method Details
-
rewrite
public org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader) throws IOException- Overrides:
rewrite
in classorg.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 classorg.apache.lucene.search.Query
- Throws:
IOException
-
visit
public void visit(org.apache.lucene.search.QueryVisitor visitor)- Overrides:
visit
in classorg.apache.lucene.search.Query
-
toString
- Specified by:
toString
in classorg.apache.lucene.search.Query
-
equals
- Specified by:
equals
in classorg.apache.lucene.search.Query
-
hashCode
public int hashCode()- Specified by:
hashCode
in classorg.apache.lucene.search.Query
-