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. TypeTokenFilter-whitelist.patch
        1 kB
        Santiago M. Mola
      2. TypeTokenFilter_whitelst_lucene_and_solr.patch
        3 kB
        Santiago M. Mola
      3. LUCENE-3744_2.patch
        3 kB
        Tommaso Teofili

        Activity

        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Tommaso Teofili made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.6 [ 12319070 ]
        Fix Version/s 4.0 [ 12314025 ]
        Resolution Fixed [ 1 ]
        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
        Tommaso Teofili made changes -
        Assignee Tommaso Teofili [ teofili ]
        Tommaso Teofili made changes -
        Attachment LUCENE-3744_2.patch [ 12513113 ]
        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).
        Santiago M. Mola made changes -
        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 -

        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?
        Santiago M. Mola made changes -
        Field Original Value New Value
        Attachment TypeTokenFilter-whitelist.patch [ 12512740 ]
        Hide
        Santiago M. Mola added a comment -

        Add useWhitelist option to TypeTokenFilter.

        Show
        Santiago M. Mola added a comment - Add useWhitelist option to TypeTokenFilter.
        Santiago M. Mola created issue -

          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