Package org.elasticsearch.search.runtime
Class BooleanScriptFieldExistsQuery
java.lang.Object
org.apache.lucene.search.Query
org.elasticsearch.search.runtime.BooleanScriptFieldExistsQuery
public class BooleanScriptFieldExistsQuery
extends org.apache.lucene.search.Query
-
Field Summary
Fields Modifier and Type Field Description protected static float
MATCH_COST
We don't have the infrastructure to estimate the match cost of a script so we just use a big number. -
Constructor Summary
Constructors Constructor Description BooleanScriptFieldExistsQuery(Script script, BooleanFieldScript.LeafFactory leafFactory, java.lang.String fieldName)
-
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
equals(java.lang.Object obj)
int
hashCode()
protected boolean
matches(int trues, int falses)
Does the value match this query?protected boolean
matches(BooleanFieldScript scriptContext, int docId)
java.lang.String
toString(java.lang.String field)
void
visit(org.apache.lucene.search.QueryVisitor visitor)
Methods inherited from class org.apache.lucene.search.Query
classHash, rewrite, sameClassAs, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
MATCH_COST
protected static final float MATCH_COSTWe don't have the infrastructure to estimate the match cost of a script so we just use a big number.- See Also:
- Constant Field Values
-
-
Constructor Details
-
BooleanScriptFieldExistsQuery
public BooleanScriptFieldExistsQuery(Script script, BooleanFieldScript.LeafFactory leafFactory, java.lang.String fieldName)
-
-
Method Details
-
matches
protected boolean matches(int trues, int falses)Does the value match this query?- Parameters:
trues
- the number of true values returned by the scriptfalses
- the number of false values returned by the script
-
toString
public final java.lang.String toString(java.lang.String field)- Specified by:
toString
in classorg.apache.lucene.search.Query
-
matches
-
visit
public final void visit(org.apache.lucene.search.QueryVisitor visitor)- Overrides:
visit
in classorg.apache.lucene.search.Query
-
createWeight
public org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.search.ScoreMode scoreMode, float boost) throws java.io.IOException- Overrides:
createWeight
in classorg.apache.lucene.search.Query
- Throws:
java.io.IOException
-
hashCode
public int hashCode()- Specified by:
hashCode
in classorg.apache.lucene.search.Query
-
equals
public boolean equals(java.lang.Object obj)- Specified by:
equals
in classorg.apache.lucene.search.Query
-