Class ExtendedCommonTermsQuery


  • @Deprecated
    public class ExtendedCommonTermsQuery
    extends org.apache.lucene.queries.CommonTermsQuery
    Deprecated.
    Since max_optimization optimization landed in 7.0, normal MatchQuery will achieve the same result without any configuration.
    Extended version of CommonTermsQuery that allows to pass in a minimumNumberShouldMatch specification that uses the actual num of high frequent terms to calculate the minimum matching terms.
    • Field Summary

      • Fields inherited from class org.apache.lucene.queries.CommonTermsQuery

        highFreqBoost, highFreqMinNrShouldMatch, highFreqOccur, lowFreqBoost, lowFreqMinNrShouldMatch, lowFreqOccur, maxTermFrequency, terms
    • Constructor Summary

      Constructors 
      Constructor Description
      ExtendedCommonTermsQuery​(org.apache.lucene.search.BooleanClause.Occur highFreqOccur, org.apache.lucene.search.BooleanClause.Occur lowFreqOccur, float maxTermFrequency)
      Deprecated.
       
    • Method Summary

      Modifier and Type Method Description
      protected int calcHighFreqMinimumNumberShouldMatch​(int numOptional)
      Deprecated.
       
      protected int calcLowFreqMinimumNumberShouldMatch​(int numOptional)
      Deprecated.
       
      protected int calcMinimumNumberShouldMatch​(java.lang.String spec, int numOptional)
      Deprecated.
       
      java.lang.String getHighFreqMinimumNumberShouldMatchSpec()
      Deprecated.
       
      java.lang.String getLowFreqMinimumNumberShouldMatchSpec()
      Deprecated.
       
      float getMaxTermFrequency()
      Deprecated.
       
      void setHighFreqMinimumNumberShouldMatch​(java.lang.String spec)
      Deprecated.
       
      void setLowFreqMinimumNumberShouldMatch​(java.lang.String spec)
      Deprecated.
       
      • Methods inherited from class org.apache.lucene.queries.CommonTermsQuery

        add, buildQuery, collectTermStates, equals, getHighFreqBoost, getHighFreqMinimumNumberShouldMatch, getHighFreqOccur, getLowFreqBoost, getLowFreqMinimumNumberShouldMatch, getLowFreqOccur, getTerms, hashCode, newTermQuery, rewrite, setHighFreqMinimumNumberShouldMatch, setLowFreqMinimumNumberShouldMatch, toString, visit
      • Methods inherited from class org.apache.lucene.search.Query

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

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

      • ExtendedCommonTermsQuery

        public ExtendedCommonTermsQuery​(org.apache.lucene.search.BooleanClause.Occur highFreqOccur,
                                        org.apache.lucene.search.BooleanClause.Occur lowFreqOccur,
                                        float maxTermFrequency)
        Deprecated.
    • Method Detail

      • calcLowFreqMinimumNumberShouldMatch

        protected int calcLowFreqMinimumNumberShouldMatch​(int numOptional)
        Deprecated.
        Overrides:
        calcLowFreqMinimumNumberShouldMatch in class org.apache.lucene.queries.CommonTermsQuery
      • calcMinimumNumberShouldMatch

        protected int calcMinimumNumberShouldMatch​(java.lang.String spec,
                                                   int numOptional)
        Deprecated.
      • calcHighFreqMinimumNumberShouldMatch

        protected int calcHighFreqMinimumNumberShouldMatch​(int numOptional)
        Deprecated.
        Overrides:
        calcHighFreqMinimumNumberShouldMatch in class org.apache.lucene.queries.CommonTermsQuery
      • setHighFreqMinimumNumberShouldMatch

        public void setHighFreqMinimumNumberShouldMatch​(java.lang.String spec)
        Deprecated.
      • getHighFreqMinimumNumberShouldMatchSpec

        public java.lang.String getHighFreqMinimumNumberShouldMatchSpec()
        Deprecated.
      • setLowFreqMinimumNumberShouldMatch

        public void setLowFreqMinimumNumberShouldMatch​(java.lang.String spec)
        Deprecated.
      • getLowFreqMinimumNumberShouldMatchSpec

        public java.lang.String getLowFreqMinimumNumberShouldMatchSpec()
        Deprecated.
      • getMaxTermFrequency

        public float getMaxTermFrequency()
        Deprecated.
        Overrides:
        getMaxTermFrequency in class org.apache.lucene.queries.CommonTermsQuery