Solr
  1. Solr
  2. SOLR-253

Add a RequiredWordFilter that acts like the inverse of a StopFilter

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None

      Description

      Add a filter factory that only keeps tokens with text in the required word list.

      <filter class="solr.RequiredWordFilterFactory" ignoreCase="true" words="requiredwords.txt" />

      1. SOLR-253-RequireWords.patch
        9 kB
        Ryan McKinley
      2. SOLR-253-RequireWords.patch
        7 kB
        Ryan McKinley
      3. SOLR-253-RequireWords.patch
        7 kB
        Ryan McKinley

        Activity

        Hide
        Ryan McKinley added a comment -

        simple patch and test

        Show
        Ryan McKinley added a comment - simple patch and test
        Hide
        Ryan McKinley added a comment -

        by "requiteWord" I mean, "requireWord"

        Show
        Ryan McKinley added a comment - by "requiteWord" I mean, "requireWord"
        Hide
        Hoss Man added a comment -

        the first thing i thought when reading the description of this issue was that it seemed like a strnage bastardization of the StopFilter class ... looking at the patch i see it's not even implemented in the StopFilter - it's a new "GoFilter" class which makes me feel a lot better.

        I'd rather see a new "GoFilterFactory" class be added then to have a conditional switch in StopFilterFactory ... people skimming a schema may not notice a requireWord boolean on a StopFilterFactory declaration that completely reverses the meaning of the declaration ... it would be better to make it more obvious.

        Show
        Hoss Man added a comment - the first thing i thought when reading the description of this issue was that it seemed like a strnage bastardization of the StopFilter class ... looking at the patch i see it's not even implemented in the StopFilter - it's a new "GoFilter" class which makes me feel a lot better. I'd rather see a new "GoFilterFactory" class be added then to have a conditional switch in StopFilterFactory ... people skimming a schema may not notice a requireWord boolean on a StopFilterFactory declaration that completely reverses the meaning of the declaration ... it would be better to make it more obvious.
        Hide
        Ryan McKinley added a comment -

        Changed this to be its own Filter, rather then a hacked StopFilter...

        Show
        Ryan McKinley added a comment - Changed this to be its own Filter, rather then a hacked StopFilter...
        Hide
        Ryan McKinley added a comment -

        just realized I uploaded the wrong patch... this one does what I said!

        Show
        Ryan McKinley added a comment - just realized I uploaded the wrong patch... this one does what I said!
        Hide
        Ryan McKinley added a comment -

        added a while ago KeepWordsFilter

        Show
        Ryan McKinley added a comment - added a while ago KeepWordsFilter
        Hide
        Hoss Man added a comment -

        This bug was modified as part of a bulk update using the criteria...

        • Marked "Resolved" and "Fixed"
        • Had no "Fix Version" versions
        • Was listed in the CHANGES.txt for 1.3 as of today 2008-03-15

        The Fix Version for all 29 issues found was set to 1.3, email notification was suppressed to prevent excessive email.

        For a list of all the issues modified, search jira comments for this (hopefully) unique string: batch20070315hossman1

        Show
        Hoss Man added a comment - This bug was modified as part of a bulk update using the criteria... Marked "Resolved" and "Fixed" Had no "Fix Version" versions Was listed in the CHANGES.txt for 1.3 as of today 2008-03-15 The Fix Version for all 29 issues found was set to 1.3, email notification was suppressed to prevent excessive email. For a list of all the issues modified, search jira comments for this (hopefully) unique string: batch20070315hossman1

          People

          • Assignee:
            Ryan McKinley
            Reporter:
            Ryan McKinley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development