Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3395

FreqFilteringScorerWrapper and min/max freq options on TermQuery

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • New

    Description

      A Solr User was asking about how specify a minimum tf when searching for a term (ie: documents matching "dog" at least 3 times).

      Based on a conversation with rmuir on IRC, that led me to realize that we now explicitly expose a general "freq()" method on Scorer, and that min/max freq constraints could be implemented as a general Scorer Wrapper.

      I propose that we add such a wrapper, and add setMinFreq(float)/setMaxFreq(float) methods to TermQuery (similar to the minNumShouldMatches and disableCoord type setters in BooleanQuery) that cause it to be used automatically.

      Attachments

        1. LUCENE-3395.patch
          13 kB
          Chris M. Hostetter

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hossman Chris M. Hostetter
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: