Class ExtendedCommonTermsQuery

  • All Implemented Interfaces:
    Cloneable


    public class ExtendedCommonTermsQuery
    extends org.apache.lucene.queries.CommonTermsQuery
    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.
    • Constructor Detail

      • ExtendedCommonTermsQuery

        public ExtendedCommonTermsQuery(org.apache.lucene.search.BooleanClause.Occur highFreqOccur,
                                        org.apache.lucene.search.BooleanClause.Occur lowFreqOccur,
                                        float maxTermFrequency,
                                        boolean disableCoord,
                                        FieldMapper<?> mapper)
    • Method Detail

      • calcLowFreqMinimumNumberShouldMatch

        protected int calcLowFreqMinimumNumberShouldMatch(int numOptional)
      • calcMinimumNumberShouldMatch

        protected int calcMinimumNumberShouldMatch(String spec,
                                                   int numOptional)
      • calcHighFreqMinimumNumberShouldMatch

        protected int calcHighFreqMinimumNumberShouldMatch(int numOptional)
      • setHighFreqMinimumNumberShouldMatch

        public void setHighFreqMinimumNumberShouldMatch(String spec)
      • getHighFreqMinimumNumberShouldMatchSpec

        public String getHighFreqMinimumNumberShouldMatchSpec()
      • setLowFreqMinimumNumberShouldMatch

        public void setLowFreqMinimumNumberShouldMatch(String spec)
      • getLowFreqMinimumNumberShouldMatchSpec

        public String getLowFreqMinimumNumberShouldMatchSpec()
      • newTermQuery

        protected org.apache.lucene.search.Query newTermQuery(org.apache.lucene.index.Term term,
                                                              org.apache.lucene.index.TermContext context)