Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: core/queryparser
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      It would be convenient to have a TypeTokenFilter that filters tokens by its type, either with an exclude or include list. This might be a stupid thing to provide for people who use Lucene directly, but it would be very useful to later expose it to Solr and other Lucene-backed search solutions.

      1. LUCENE-3671_2.patch
        2 kB
        Tommaso Teofili
      2. LUCENE-3671_3.patch
        6 kB
        Tommaso Teofili
      3. LUCENE-3671.patch
        2 kB
        Tommaso Teofili

        Activity

        Hide
        Tommaso Teofili added a comment -

        A very basic TypeTokenFilter can be implemented extending a FilteringTokenFilter where the accept() method checks on a stopType set for the typeAttribute.type() matching.

        Show
        Tommaso Teofili added a comment - A very basic TypeTokenFilter can be implemented extending a FilteringTokenFilter where the accept() method checks on a stopType set for the typeAttribute.type() matching.
        Hide
        Robert Muir added a comment -

        Patch looks good Tommaso: though I think stopTypes should be Set<String> because type attribute is a string.

        Show
        Robert Muir added a comment - Patch looks good Tommaso: though I think stopTypes should be Set<String> because type attribute is a string.
        Hide
        Tommaso Teofili added a comment -

        Thanks Robert, you're right.
        Updated patch attached.

        Show
        Tommaso Teofili added a comment - Thanks Robert, you're right. Updated patch attached.
        Hide
        Tommaso Teofili added a comment -

        updated patch with unit test

        Show
        Tommaso Teofili added a comment - updated patch with unit test
        Hide
        Uwe Schindler added a comment -

        Hi Tommaso!

        Nice work, I will commit this if nobody objects!

        Show
        Uwe Schindler added a comment - Hi Tommaso! Nice work, I will commit this if nobody objects!
        Hide
        Tommaso Teofili added a comment -

        Thanks Uwe for taking care of it

        Show
        Tommaso Teofili added a comment - Thanks Uwe for taking care of it
        Hide
        Uwe Schindler added a comment -

        Committed trunk revision: 1234396
        Committed 3.x revision: 1234397

        Tommaso: Can you maybe provide a Solr factory in a separate Solr issue (or reopen this one)?

        Show
        Uwe Schindler added a comment - Committed trunk revision: 1234396 Committed 3.x revision: 1234397 Tommaso: Can you maybe provide a Solr factory in a separate Solr issue (or reopen this one)?
        Hide
        Tommaso Teofili added a comment -

        Sure Uwe, I'll open a new one for the related Solr factory

        Show
        Tommaso Teofili added a comment - Sure Uwe, I'll open a new one for the related Solr factory
        Hide
        Michael McCandless added a comment -

        Uwe looks like you committed as LUCENE-3121 by accident...

        Show
        Michael McCandless added a comment - Uwe looks like you committed as LUCENE-3121 by accident...
        Hide
        Uwe Schindler added a comment -

        Oh did I use wrong issue number? I'll fix commit messages!

        Show
        Uwe Schindler added a comment - Oh did I use wrong issue number? I'll fix commit messages!
        Hide
        Uwe Schindler added a comment -

        Fixed, I am so sorr!. Was a copypaste error from previous CHANGES.txt entry, I duplicated to edit. I used the entry as commit message with wrong issue number, too. That's how it happened

        Show
        Uwe Schindler added a comment - Fixed, I am so sorr!. Was a copypaste error from previous CHANGES.txt entry, I duplicated to edit. I used the entry as commit message with wrong issue number, too. That's how it happened

          People

          • Assignee:
            Uwe Schindler
            Reporter:
            Santiago M. Mola
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development