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

PatternReplaceCharFilterFactory should implement MultiTermAware

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0, 6.5
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The multi-term aware marker API is useful to know which analysis components to apply when analyzing prefix or wildcard queries. I think PatternReplaceCharFilterFactory qualifies?

      For the record, we have MappingCharFilterFactory that does a similar job (except that it takes an explicit map of replacements rather than regular expressions) and implements MultiTermAware.

        Activity

        Hide
        erickerickson Erick Erickson added a comment -

        The basic rule is that as long as the filter doesn't output more than one token per input token, making it MultiTermAware is appropriate.

        There was never an attempt to do an exhaustive analysis of all the filters that qualified. Frankly, my motivation was that explaining over and over again that "wildcard searches are case sensitive because...." got really tiring so just fixing that use-case was enough to get us going, the rest was an added benefit

        Since then it's more have been added but mostly whenever someone was motivated to add another, so please feel free.

        Show
        erickerickson Erick Erickson added a comment - The basic rule is that as long as the filter doesn't output more than one token per input token, making it MultiTermAware is appropriate. There was never an attempt to do an exhaustive analysis of all the filters that qualified. Frankly, my motivation was that explaining over and over again that "wildcard searches are case sensitive because...." got really tiring so just fixing that use-case was enough to get us going, the rest was an added benefit Since then it's more have been added but mostly whenever someone was motivated to add another, so please feel free.
        Hide
        jpountz Adrien Grand added a comment -

        Thanks Erick, I'll add it.

        Show
        jpountz Adrien Grand added a comment - Thanks Erick, I'll add it.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit f0e59ea84918bfa98649d9e496b50dc0db419dd5 in lucene-solr's branch refs/heads/master from Adrien Grand
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f0e59ea ]

        LUCENE-7692: PatternReplaceCharFilterFactory should implement MultiTermAware.

        Show
        jira-bot ASF subversion and git services added a comment - Commit f0e59ea84918bfa98649d9e496b50dc0db419dd5 in lucene-solr's branch refs/heads/master from Adrien Grand [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f0e59ea ] LUCENE-7692 : PatternReplaceCharFilterFactory should implement MultiTermAware.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 4a636c41ca7c5ee902da561f31c5d386cb54687f in lucene-solr's branch refs/heads/branch_6x from Adrien Grand
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=4a636c4 ]

        LUCENE-7692: PatternReplaceCharFilterFactory should implement MultiTermAware.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 4a636c41ca7c5ee902da561f31c5d386cb54687f in lucene-solr's branch refs/heads/branch_6x from Adrien Grand [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=4a636c4 ] LUCENE-7692 : PatternReplaceCharFilterFactory should implement MultiTermAware.

          People

          • Assignee:
            jpountz Adrien Grand
            Reporter:
            jpountz Adrien Grand
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development