Class SourceConfirmedTextQuery

java.lang.Object
org.apache.lucene.search.Query
org.elasticsearch.index.query.SourceConfirmedTextQuery

public final class SourceConfirmedTextQuery extends org.apache.lucene.search.Query
A variant of TermQuery, PhraseQuery, MultiPhraseQuery and span queries that uses postings for its approximation, but falls back to stored fields or _source whenever term frequencies or positions are needed. This query matches and scores the same way as the wrapped query.
  • Constructor Details

  • Method Details

    • approximate

      public static org.apache.lucene.search.Query approximate(org.apache.lucene.search.Query query)
      Create an approximation for the given query. The returned approximation should match a superset of the matches of the provided query.
    • getQuery

      public org.apache.lucene.search.Query getQuery()
    • toString

      public String toString(String field)
      Specified by:
      toString in class org.apache.lucene.search.Query
    • equals

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

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

      public org.apache.lucene.search.Query rewrite(IndexReader reader) throws IOException
      Overrides:
      rewrite in class org.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 class org.apache.lucene.search.Query
      Throws:
      IOException