Class DoubleScriptFieldTermsQuery

java.lang.Object
org.apache.lucene.search.Query
org.elasticsearch.search.runtime.DoubleScriptFieldTermsQuery

public class DoubleScriptFieldTermsQuery
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
    DoubleScriptFieldTermsQuery​(Script script, DoubleFieldScript.LeafFactory leafFactory, java.lang.String fieldName, com.carrotsearch.hppc.LongSet terms)
    Build the query.
  • 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​(double[] values, int count)
    Does the value match this query?
    protected boolean matches​(DoubleFieldScript 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_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
  • Constructor Details

    • DoubleScriptFieldTermsQuery

      public DoubleScriptFieldTermsQuery​(Script script, DoubleFieldScript.LeafFactory leafFactory, java.lang.String fieldName, com.carrotsearch.hppc.LongSet terms)
      Build the query.
      Parameters:
      terms - The terms converted to a long with Double.doubleToLongBits(double).
  • Method Details

    • matches

      protected boolean matches​(double[] values, int count)
      Does the value match this query?
    • toString

      public final java.lang.String toString​(java.lang.String field)
      Specified by:
      toString in class org.apache.lucene.search.Query
    • hashCode

      public int hashCode()
    • equals

      public boolean equals​(java.lang.Object obj)
    • matches

      protected boolean matches​(DoubleFieldScript scriptContext, int docId)
    • visit

      public final void visit​(org.apache.lucene.search.QueryVisitor visitor)
      Overrides:
      visit in class org.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 class org.apache.lucene.search.Query
      Throws:
      java.io.IOException