Class SingleValueMatchQuery

java.lang.Object
org.apache.lucene.search.Query
org.elasticsearch.compute.querydsl.query.SingleValueMatchQuery

public final class SingleValueMatchQuery extends org.apache.lucene.search.Query
Finds all fields with a single-value. If a field has a multi-value, it emits a warning.

Warnings are only emitted if the TwoPhaseIterator.matches(). Meaning that, if the other query skips the doc either because the index doesn't match or because it's TwoPhaseIterator.matches() doesn't match, then we won't log warnings. So it's most safe to say that this will emit a warning if the document would have matched but for having a multivalued field. If the document doesn't match but "almost" matches in some fairly lucene-specific ways then it *might* emit a warning.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • 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
     
    org.apache.lucene.search.Query
    rewrite(org.apache.lucene.search.IndexSearcher indexSearcher)
     
     
    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
  • Constructor Details

  • Method Details

    • toString

      public String toString(String field)
      Specified by:
      toString 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)
      Overrides:
      createWeight in class org.apache.lucene.search.Query
    • rewrite

      public org.apache.lucene.search.Query rewrite(org.apache.lucene.search.IndexSearcher indexSearcher) throws IOException
      Overrides:
      rewrite in class org.apache.lucene.search.Query
      Throws:
      IOException
    • visit

      public void visit(org.apache.lucene.search.QueryVisitor visitor)
      Specified by:
      visit 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