Class AbstractScriptFieldQuery<S extends AbstractFieldScript>

java.lang.Object
org.apache.lucene.search.Query
org.elasticsearch.search.runtime.AbstractScriptFieldQuery<S>
Direct Known Subclasses:
AbstractStringScriptFieldAutomatonQuery, BooleanScriptFieldExistsQuery, BooleanScriptFieldTermQuery, DoubleScriptFieldExistsQuery, DoubleScriptFieldRangeQuery, DoubleScriptFieldTermQuery, DoubleScriptFieldTermsQuery, GeoPointScriptFieldDistanceFeatureQuery, GeoPointScriptFieldExistsQuery, GeoPointScriptFieldGeoShapeQuery, IpScriptFieldExistsQuery, IpScriptFieldRangeQuery, IpScriptFieldTermQuery, IpScriptFieldTermsQuery, LongScriptFieldDistanceFeatureQuery, LongScriptFieldExistsQuery, LongScriptFieldRangeQuery, LongScriptFieldTermQuery, LongScriptFieldTermsQuery, StringScriptFieldExistsQuery, StringScriptFieldPrefixQuery, StringScriptFieldRangeQuery, StringScriptFieldTermQuery, StringScriptFieldTermsQuery

public abstract class AbstractScriptFieldQuery<S extends AbstractFieldScript> extends org.apache.lucene.search.Query
Abstract base class for building queries based on script fields.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static float
    We don't have the infrastructure to estimate the match cost of a script so we just use a big number.
  • 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
     
    protected abstract boolean
    matches(S scriptContext, int docId)
     

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

    classHash, rewrite, sameClassAs, toString, toString, visit

    Methods inherited from class java.lang.Object

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

    • MATCH_COST

      protected static final float MATCH_COST
      We 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
  • Method Details

    • 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
    • matches

      protected abstract boolean matches(S scriptContext, int docId)
    • hashCode

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

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