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

AnalyzingInfixSuggester returns wrong results with allTermsRequired=false plus contexts

    Details

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

      Description

      I hit this bug while dog-food eating (attempting to upgrade http://jirasearch.mikemccandless.com from 4.6.x to 6.x):

      If you ask AnalyzingInfixSuggester for suggestions, but 1) you do not require all terms to match, and 2) you provide a context for filtering the results, then you'll get back results that did not match any of the terms from the user's query but did match solely the context filter.

      1. LUCENE-7505.patch
        6 kB
        Michael McCandless

        Activity

        Hide
        mikemccand Michael McCandless added a comment -

        Patch w/ test + fix; I think it's ready.

        The problem was we were producing this BooleanQuery when user typed "foo":

          foo +context:bar
        

        when you did not require all terms and provided a context filter on bar, but of course this will include hits that had context:bar but not foo.

        This fix is easy: in this case, I push the foo part (which can be multiple terms) down into a new BQ MUST clause.

        Show
        mikemccand Michael McCandless added a comment - Patch w/ test + fix; I think it's ready. The problem was we were producing this BooleanQuery when user typed "foo": foo +context:bar when you did not require all terms and provided a context filter on bar, but of course this will include hits that had context:bar but not foo . This fix is easy: in this case, I push the foo part (which can be multiple terms) down into a new BQ MUST clause.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 935a5d346f502fadf9de517b59aff2222c3e30a3 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=935a5d3 ]

        LUCENE-7505: AnalyzingInfixSuggester returned invalid results when allTermsRequired is false and context filters are specified

        Show
        jira-bot ASF subversion and git services added a comment - Commit 935a5d346f502fadf9de517b59aff2222c3e30a3 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=935a5d3 ] LUCENE-7505 : AnalyzingInfixSuggester returned invalid results when allTermsRequired is false and context filters are specified
        Hide
        jira-bot ASF subversion and git services added a comment -

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

        LUCENE-7505: AnalyzingInfixSuggester returned invalid results when allTermsRequired is false and context filters are specified

        Show
        jira-bot ASF subversion and git services added a comment - Commit 45ca4bd3ed53b264cb1188bac5c76efa47d6e23e in lucene-solr's branch refs/heads/master from Mike McCandless [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=45ca4bd ] LUCENE-7505 : AnalyzingInfixSuggester returned invalid results when allTermsRequired is false and context filters are specified
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Closing after 6.3.0 release.

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Closing after 6.3.0 release.

          People

          • Assignee:
            mikemccand Michael McCandless
            Reporter:
            mikemccand Michael McCandless
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development