Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8769

CloudMLTQParser does not use uniqueKey field name for exclusion

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.1, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      Using the {!mlt} query parser in cloud mode on a schema with a non-"id" uniqueKey, the main "like this" document won't be excluded properly due to this code:

      realMLTQuery.add(createIdQuery("id", id), BooleanClause.Occur.MUST_NOT);
      

      See also https://github.com/apache/lucene-solr/blob/813ca77250db29116812bc949e2a466a70f969a3/solr/core/src/java/org/apache/solr/search/mlt/CloudMLTQParser.java#L166

      Like SimpleMLTQParser, it needs to use the uniqueKey field with this type of code: req.getSchema().getUniqueKeyField().getName()

        Activity

        Hide
        anshumg Anshum Gupta added a comment -

        Thanks for pointing this out Erik Hatcher. I committed this but forgot to specify the JIRA#.
        I tried to amend the commit message but for some reason that isn't working. Until that happens, thought I'll update the JIRA manually.

        Here's the commit hash: 44d8ee9115ebcfdaba03238031b68a58dbcc4cd6

        Show
        anshumg Anshum Gupta added a comment - Thanks for pointing this out Erik Hatcher . I committed this but forgot to specify the JIRA#. I tried to amend the commit message but for some reason that isn't working. Until that happens, thought I'll update the JIRA manually. Here's the commit hash: 44d8ee9115ebcfdaba03238031b68a58dbcc4cd6
        Hide
        jira-bot ASF subversion and git services added a comment -

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

        SOLR-8769: Fix document exclusion in mlt query parser in Cloud mode for schemas that have non-'id' unique field

        Show
        jira-bot ASF subversion and git services added a comment - Commit ba039f7c8c28518053776fe9952e5cb93c5b3f75 in lucene-solr's branch refs/heads/branch_6x from anshum [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=ba039f7 ] SOLR-8769 : Fix document exclusion in mlt query parser in Cloud mode for schemas that have non-'id' unique field
        Hide
        anshumg Anshum Gupta added a comment -

        I'm waiting to hear back from Nick before I port this for the 6.0 release.

        Show
        anshumg Anshum Gupta added a comment - I'm waiting to hear back from Nick before I port this for the 6.0 release.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 18874ababc73404356bd24fef2687d33f9489887 in lucene-solr's branch refs/heads/branch_6_0 from anshum
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=18874ab ]

        SOLR-8769: Fix document exclusion in mlt query parser in Cloud mode for schemas that have non-'id' unique field

        Show
        jira-bot ASF subversion and git services added a comment - Commit 18874ababc73404356bd24fef2687d33f9489887 in lucene-solr's branch refs/heads/branch_6_0 from anshum [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=18874ab ] SOLR-8769 : Fix document exclusion in mlt query parser in Cloud mode for schemas that have non-'id' unique field
        Hide
        anshumg Anshum Gupta added a comment -

        branch_5x

        commit 8dc61cecdc933b52a8ec15eb34756e50ee2378ab
        Author: anshum <anshum@apache.org>
        Date:   Thu Mar 3 15:27:04 2016 -0800
        
            SOLR-8769: Fix document exclusion in mlt query parser in Cloud mode for schemas that have non-'id' unique field
        

        branch_5_5

        commit 66f47a53f904bab2d845a1a3baf2e0090830cfc7
        Author: anshum <anshum@apache.org>
        Date:   Thu Mar 3 15:27:04 2016 -0800
        
            SOLR-8769: Fix document exclusion in mlt query parser in Cloud mode for schemas that have non-'id' unique field
        
        Show
        anshumg Anshum Gupta added a comment - branch_5x commit 8dc61cecdc933b52a8ec15eb34756e50ee2378ab Author: anshum <anshum@apache.org> Date: Thu Mar 3 15:27:04 2016 -0800 SOLR-8769: Fix document exclusion in mlt query parser in Cloud mode for schemas that have non-'id' unique field branch_5_5 commit 66f47a53f904bab2d845a1a3baf2e0090830cfc7 Author: anshum <anshum@apache.org> Date: Thu Mar 3 15:27:04 2016 -0800 SOLR-8769: Fix document exclusion in mlt query parser in Cloud mode for schemas that have non-'id' unique field

          People

          • Assignee:
            Unassigned
            Reporter:
            ehatcher Erik Hatcher
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development