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

ASCIIFoldingFilterFactory.getMultiTermComponent can emit two tokens

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: master (7.0), 6.4
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      My understanding is that it is a requirement for multi-term analysis to only normalize tokens, and not eg. remove tokens (stop filter) or add tokens (by tokenizing or adding synonyms). Yet ASCIIFoldingFilterFactory.getMultiTermComponent will return a factory that emits synonyms if preserveOriginal is set to true on the original filter.

      This looks like a bug to me but I'm not entirely sure how to fix it. Should the multi-term analysis component do ascii folding or not if the original factory has preserveOriginal set to true?

        Activity

        Hide
        jpountz Adrien Grand added a comment -

        Here is a proposal: the multi-term component only emits the folded token, even when preserveOriginal is true.

        Show
        jpountz Adrien Grand added a comment - Here is a proposal: the multi-term component only emits the folded token, even when preserveOriginal is true.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 0e50101ee3e493fccce44ca0d8b5bf985744b0d9 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=0e50101 ]

        LUCENE-7536: ASCIIFoldingFilterFactory.getMultiTermComponent can emit two tokens.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 0e50101ee3e493fccce44ca0d8b5bf985744b0d9 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=0e50101 ] LUCENE-7536 : ASCIIFoldingFilterFactory.getMultiTermComponent can emit two tokens.
        Hide
        jira-bot ASF subversion and git services added a comment -

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

        LUCENE-7536: ASCIIFoldingFilterFactory.getMultiTermComponent can emit two tokens.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 6d540b9d7a1a9b944bacb348c7ea681705e462e4 in lucene-solr's branch refs/heads/master from Adrien Grand [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6d540b9 ] LUCENE-7536 : ASCIIFoldingFilterFactory.getMultiTermComponent can emit two tokens.

          People

          • Assignee:
            Unassigned
            Reporter:
            jpountz Adrien Grand
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development