Lucene - Core
  1. Lucene - Core
  2. LUCENE-3744

Add support for type whitelist in TypeTokenFilter

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: modules/analysis
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      A usual use case for TypeTokenFilter is allowing only a set of token types. That is, listing allowed types, instead of filtered ones. I'm attaching a patch to add a useWhitelist option for that.

      1. LUCENE-3744_2.patch
        3 kB
        Tommaso Teofili
      2. TypeTokenFilter_whitelst_lucene_and_solr.patch
        3 kB
        Santiago M. Mola
      3. TypeTokenFilter-whitelist.patch
        1 kB
        Santiago M. Mola

        Activity

        Hide
        Santiago M. Mola added a comment -

        Add useWhitelist option to TypeTokenFilter.

        Show
        Santiago M. Mola added a comment - Add useWhitelist option to TypeTokenFilter.
        Hide
        Tommaso Teofili added a comment -

        Hello Santiago,
        would you mind also providing unit tests for the whitelist usage?

        Show
        Tommaso Teofili added a comment - Hello Santiago, would you mind also providing unit tests for the whitelist usage?
        Hide
        Santiago M. Mola added a comment -

        Sure. Here's the patch with tests and Solr's factory changes.

        Show
        Santiago M. Mola added a comment - Sure. Here's the patch with tests and Solr's factory changes.
        Hide
        Tommaso Teofili added a comment -

        Thanks Santiago, I updated the patch to split the Lucene changes from the Solr changes (will open a new Jira for the Solr factories changes).

        Show
        Tommaso Teofili added a comment - Thanks Santiago, I updated the patch to split the Lucene changes from the Solr changes (will open a new Jira for the Solr factories changes).
        Hide
        Tommaso Teofili added a comment -

        applied on trunk r1240034
        appliend on branch-3.x r1240035

        Show
        Tommaso Teofili added a comment - applied on trunk r1240034 appliend on branch-3.x r1240035

          People

          • Assignee:
            Tommaso Teofili
            Reporter:
            Santiago M. Mola
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development