Class MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite

    • Constructor Detail

      • TopTermsBoostOnlyBooleanQueryRewrite

        public TopTermsBoostOnlyBooleanQueryRewrite​(int size)
        Create a TopTermsBoostOnlyBooleanQueryRewrite for at most size terms.

        NOTE: if BooleanQuery.getMaxClauseCount() is smaller than size, then it will be used instead.

    • Method Detail

      • getMaxSize

        protected int getMaxSize()
        Description copied from class: TopTermsRewrite
        return the maximum size of the priority queue (for boolean rewrites this is BooleanQuery#getMaxClauseCount).
        Specified by:
        getMaxSize in class TopTermsRewrite<BooleanQuery>
      • getTopLevelQuery

        protected BooleanQuery getTopLevelQuery()
        Return a suitable top-level Query for holding all expanded terms.
      • addClause

        protected final void addClause​(Q topLevel,
                                       Term term,
                                       int docCount,
                                       float boost)
                                throws IOException
        Add a MultiTermQuery term to the top-level query
        Throws:
        IOException