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

SimpleQueryString should support auto fuziness

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0, 6.5
    • Component/s: core/queryparser
    • Labels:
      None

      Description

      Apparently the simpleQueryString query does not support auto fuziness as the query string does.

      So foo:bar~1 works for both simple query string and query string queries.
      But foo:bar~ works for query string query but not for simple query string query.

        Activity

        Hide
        dakrone Lee Hinman added a comment -

        I am happy to submit a patch to add this, however, I don't know what the auto value should be. I wasn't able to find it except in older (3.x) documentation that mentioned it may be 0.5, is that the correct value for fuzziness that should be used if there is no value specified?

        Show
        dakrone Lee Hinman added a comment - I am happy to submit a patch to add this, however, I don't know what the auto value should be. I wasn't able to find it except in older (3.x) documentation that mentioned it may be 0.5, is that the correct value for fuzziness that should be used if there is no value specified?
        Hide
        mikemccand Michael McCandless added a comment -

        Hi Lee Hinman and David Pilato, I guess the challenge here is that the SimpleQueryParser accepts only integer ~N, the edit distance, which can only be 1 or 2.

        Maybe have ~ mean ~2, accepting the maximum fuzziness?

        Show
        mikemccand Michael McCandless added a comment - Hi Lee Hinman and David Pilato , I guess the challenge here is that the SimpleQueryParser accepts only integer ~N , the edit distance, which can only be 1 or 2. Maybe have ~ mean ~2 , accepting the maximum fuzziness?
        Hide
        dakrone Lee Hinman added a comment -

        Attached a small patch that adds auto-fuzziness and updates the tests to check it.

        Show
        dakrone Lee Hinman added a comment - Attached a small patch that adds auto-fuzziness and updates the tests to check it.
        Hide
        mikemccand Michael McCandless added a comment -

        Thanks Lee Hinman, patch looks good; I'll push shortly!

        Show
        mikemccand Michael McCandless added a comment - Thanks Lee Hinman , patch looks good; I'll push shortly!
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 21559fe86da5e84c75c25b8373f6c78f1ac75a8f in lucene-solr's branch refs/heads/master from Mike McCandless
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=21559fe ]

        LUCENE-7712: SimpleQueryParser now parses foo~ as foo~2

        Show
        jira-bot ASF subversion and git services added a comment - Commit 21559fe86da5e84c75c25b8373f6c78f1ac75a8f in lucene-solr's branch refs/heads/master from Mike McCandless [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=21559fe ] LUCENE-7712 : SimpleQueryParser now parses foo~ as foo~2
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit f45c31102c0700ef798d99060c21ff85b74360a4 in lucene-solr's branch refs/heads/branch_6x from Mike McCandless
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f45c311 ]

        LUCENE-7712: SimpleQueryParser now parses foo~ as foo~2

        Show
        jira-bot ASF subversion and git services added a comment - Commit f45c31102c0700ef798d99060c21ff85b74360a4 in lucene-solr's branch refs/heads/branch_6x from Mike McCandless [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f45c311 ] LUCENE-7712 : SimpleQueryParser now parses foo~ as foo~2
        Hide
        mikemccand Michael McCandless added a comment -

        Thank you David Pilato and Lee Hinman!

        Show
        mikemccand Michael McCandless added a comment - Thank you David Pilato and Lee Hinman !

          People

          • Assignee:
            Unassigned
            Reporter:
            dadoonet David Pilato
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development