Package org.elasticsearch.search.runtime
Class LongScriptFieldDistanceFeatureQuery
java.lang.Object
org.apache.lucene.search.Query
org.elasticsearch.search.runtime.LongScriptFieldDistanceFeatureQuery
public final class LongScriptFieldDistanceFeatureQuery
extends org.apache.lucene.search.Query
-
Field Summary
Fields Modifier and Type Field Description protected static floatMATCH_COSTWe 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 LongScriptFieldDistanceFeatureQuery(Script script, java.util.function.Function<org.apache.lucene.index.LeafReaderContext,AbstractLongFieldScript> leafFactory, java.lang.String fieldName, long origin, long pivot) -
Method Summary
Modifier and Type Method Description org.apache.lucene.search.WeightcreateWeight(org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.search.ScoreMode scoreMode, float boost)booleanequals(java.lang.Object obj)inthashCode()protected booleanmatches(AbstractLongFieldScript scriptContext, int docId)java.lang.StringtoString(java.lang.String field)voidvisit(org.apache.lucene.search.QueryVisitor visitor)Methods inherited from class org.apache.lucene.search.Query
classHash, rewrite, sameClassAs, toStringMethods 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
-
LongScriptFieldDistanceFeatureQuery
public LongScriptFieldDistanceFeatureQuery(Script script, java.util.function.Function<org.apache.lucene.index.LeafReaderContext,AbstractLongFieldScript> leafFactory, java.lang.String fieldName, long origin, long pivot)
-
-
Method Details
-
matches
-
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- Throws:
java.io.IOException
-
toString
public java.lang.String toString(java.lang.String field)- Specified by:
toStringin classorg.apache.lucene.search.Query
-
hashCode
public int hashCode() -
equals
public boolean equals(java.lang.Object obj) -
visit
public void visit(org.apache.lucene.search.QueryVisitor visitor)- Overrides:
visitin classorg.apache.lucene.search.Query
-