Class AllTermQuery


  • public final class AllTermQuery
    extends org.apache.lucene.search.Query
    A term query that takes all payload boost values into account.

    It is like PayloadTermQuery with AveragePayloadFunction, except unlike PayloadTermQuery, it doesn't plug into the similarity to determine how the payload should be factored in, it just parses the float and multiplies the average with the regular score.

    • Constructor Summary

      Constructors 
      Constructor Description
      AllTermQuery​(org.apache.lucene.index.Term term)  
    • Method Summary

      Modifier and Type Method Description
      org.apache.lucene.search.Weight createWeight​(org.apache.lucene.search.IndexSearcher searcher, boolean needsScores, float boost)  
      boolean equals​(java.lang.Object obj)  
      org.apache.lucene.index.Term getTerm()  
      int hashCode()  
      org.apache.lucene.search.Query rewrite​(org.apache.lucene.index.IndexReader reader)  
      java.lang.String toString​(java.lang.String field)  
      • Methods inherited from class org.apache.lucene.search.Query

        classHash, sameClassAs, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AllTermQuery

        public AllTermQuery​(org.apache.lucene.index.Term term)
    • Method Detail

      • getTerm

        public org.apache.lucene.index.Term getTerm()
      • equals

        public boolean equals​(java.lang.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​(org.apache.lucene.index.IndexReader reader)
                                               throws java.io.IOException
        Overrides:
        rewrite in class org.apache.lucene.search.Query
        Throws:
        java.io.IOException
      • createWeight

        public org.apache.lucene.search.Weight createWeight​(org.apache.lucene.search.IndexSearcher searcher,
                                                            boolean needsScores,
                                                            float boost)
                                                     throws java.io.IOException
        Overrides:
        createWeight in class org.apache.lucene.search.Query
        Throws:
        java.io.IOException
      • toString

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