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

CloudSolrStream.toExpression incorrectly handles fq clauses

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.6, 7.0
    • Fix Version/s: 6.6.1, 6.7, 7.0, 7.1, master (8.0)
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      toExpression in at least CloudSolrStream concatenates parameters in a comma-separated list. This is fine for things like sorting but incorrect for fq clauses. If my input is something like
      fq=condition1
      fq=condition2
      it winds up being something like
      fq=condition1,condition2

      I've seen it in this class for this parameter, other classes and other parameters might have the same problem.

      1. SOLR-10229.patch
        2 kB
        Erick Erickson
      2. SOLR-10908.patch
        4 kB
        Erick Erickson
      3. SOLR-10908.patch
        4 kB
        Rohit

        Activity

        Hide
        erickerickson Erick Erickson added a comment -

        Assigning to myself to track, but anyone else who wants to tackle it should feel free.

        Show
        erickerickson Erick Erickson added a comment - Assigning to myself to track, but anyone else who wants to tackle it should feel free.
        Hide
        erickerickson Erick Erickson added a comment -

        Failing test patch showing problem.

        Show
        erickerickson Erick Erickson added a comment - Failing test patch showing problem.
        Hide
        rohitcse Rohit added a comment - - edited

        Added check in function CloudSolrStream.toExpression to correct the behaviour for fq parameter.
        Post fix:

        ExpressionString: search(collection1,q=":",fl="id,a_s,a_i,a_f",sort="a_f asc, a_i asc",fq="a_s:one",fq="a_s:two",zkHost="testhost:1234")

        Requesting you to please review the patch and provide any suggestions that you see fit.

        Show
        rohitcse Rohit added a comment - - edited Added check in function CloudSolrStream.toExpression to correct the behaviour for fq parameter. Post fix: ExpressionString: search(collection1,q=" : ",fl="id,a_s,a_i,a_f",sort="a_f asc, a_i asc", fq="a_s:one",fq="a_s:two" ,zkHost="testhost:1234") Requesting you to please review the patch and provide any suggestions that you see fit.
        Hide
        erickerickson Erick Erickson added a comment -

        Final patch with CHANGES.txt

        Show
        erickerickson Erick Erickson added a comment - Final patch with CHANGES.txt
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 19fd95b46cf40fa0b91b7dcf0b157706ea718efb in lucene-solr's branch refs/heads/master from Erick Erickson
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=19fd95b ]

        commit 4241a13beb0a14e8bd81a520bd8e04ab6c7465aa
        Author: Erick Erickson <erick@apache.org>
        Date: Thu Jul 13 10:39:33 2017 -0700

        SOLR-10908: CloudSolrStream.toExpression incorrectly handles fq clauses

        Show
        jira-bot ASF subversion and git services added a comment - Commit 19fd95b46cf40fa0b91b7dcf0b157706ea718efb in lucene-solr's branch refs/heads/master from Erick Erickson [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=19fd95b ] commit 4241a13beb0a14e8bd81a520bd8e04ab6c7465aa Author: Erick Erickson <erick@apache.org> Date: Thu Jul 13 10:39:33 2017 -0700 SOLR-10908 : CloudSolrStream.toExpression incorrectly handles fq clauses
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit b7e52db2d49f9e43cdd3ac245ad2b363a66518ca in lucene-solr's branch refs/heads/branch_7x from Erick Erickson
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=b7e52db ]

        commit 4241a13beb0a14e8bd81a520bd8e04ab6c7465aa
        Author: Erick Erickson <erick@apache.org>
        Date: Thu Jul 13 10:39:33 2017 -0700

        SOLR-10908: CloudSolrStream.toExpression incorrectly handles fq clauses

        (cherry picked from commit 19fd95b)

        Show
        jira-bot ASF subversion and git services added a comment - Commit b7e52db2d49f9e43cdd3ac245ad2b363a66518ca in lucene-solr's branch refs/heads/branch_7x from Erick Erickson [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=b7e52db ] commit 4241a13beb0a14e8bd81a520bd8e04ab6c7465aa Author: Erick Erickson <erick@apache.org> Date: Thu Jul 13 10:39:33 2017 -0700 SOLR-10908 : CloudSolrStream.toExpression incorrectly handles fq clauses (cherry picked from commit 19fd95b)
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit fbc3d31f1bab7616ea631cf645923d09ef8123f3 in lucene-solr's branch refs/heads/branch_7_0 from Erick Erickson
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=fbc3d31 ]

        commit 4241a13beb0a14e8bd81a520bd8e04ab6c7465aa
        Author: Erick Erickson <erick@apache.org>
        Date: Thu Jul 13 10:39:33 2017 -0700

        SOLR-10908: CloudSolrStream.toExpression incorrectly handles fq clauses

        (cherry picked from commit 19fd95b46cf40fa0b91b7dcf0b157706ea718efb)

        Show
        jira-bot ASF subversion and git services added a comment - Commit fbc3d31f1bab7616ea631cf645923d09ef8123f3 in lucene-solr's branch refs/heads/branch_7_0 from Erick Erickson [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=fbc3d31 ] commit 4241a13beb0a14e8bd81a520bd8e04ab6c7465aa Author: Erick Erickson <erick@apache.org> Date: Thu Jul 13 10:39:33 2017 -0700 SOLR-10908 : CloudSolrStream.toExpression incorrectly handles fq clauses (cherry picked from commit 19fd95b46cf40fa0b91b7dcf0b157706ea718efb)
        Hide
        jira-bot ASF subversion and git services added a comment -

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

        commit 4241a13beb0a14e8bd81a520bd8e04ab6c7465aa
        Author: Erick Erickson <erick@apache.org>
        Date: Thu Jul 13 10:39:33 2017 -0700

        SOLR-10908: CloudSolrStream.toExpression incorrectly handles fq clauses

        (cherry picked from commit 19fd95b)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 4080791e0a7eedd5d108a5096be0d2cfaea008d6 in lucene-solr's branch refs/heads/branch_6x from Erick Erickson [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=4080791 ] commit 4241a13beb0a14e8bd81a520bd8e04ab6c7465aa Author: Erick Erickson <erick@apache.org> Date: Thu Jul 13 10:39:33 2017 -0700 SOLR-10908 : CloudSolrStream.toExpression incorrectly handles fq clauses (cherry picked from commit 19fd95b)
        Hide
        erickerickson Erick Erickson added a comment -

        Very minor change so I put it in 7.0 too.

        Show
        erickerickson Erick Erickson added a comment - Very minor change so I put it in 7.0 too.
        Hide
        varunthacker Varun Thacker added a comment -

        Hi Erick,

        Should we remove the 7.1 entry from the Fix/Versions as it's there in 7.0 already?

        Show
        varunthacker Varun Thacker added a comment - Hi Erick, Should we remove the 7.1 entry from the Fix/Versions as it's there in 7.0 already?
        Hide
        erickerickson Erick Erickson added a comment -

        Done.

        Show
        erickerickson Erick Erickson added a comment - Done.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 8547474c8ad815baf352cb86d4b1618d7dc5ac8b in lucene-solr's branch refs/heads/branch_6_6 from Erick
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=8547474 ]

        SOLR-10908: CloudSolrStream.toExpression incorrectly handles fq clauses

        Show
        jira-bot ASF subversion and git services added a comment - Commit 8547474c8ad815baf352cb86d4b1618d7dc5ac8b in lucene-solr's branch refs/heads/branch_6_6 from Erick [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=8547474 ] SOLR-10908 : CloudSolrStream.toExpression incorrectly handles fq clauses
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Bulk close after 7.1.0 release

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Bulk close after 7.1.0 release

          People

          • Assignee:
            erickerickson Erick Erickson
            Reporter:
            erickerickson Erick Erickson
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development