Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.3, 5.3.1
    • Fix Version/s: 5.4, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      This stopped working:

      http://localhost:8983/solr/provider/select?q=*%3A*&wt=json&fl=provider_json:[json]

      It now does not show the field.... 5.2.1 worked fine.

      1. SOLR-7993.patch
        0.6 kB
        Ryan McKinley
      2. SOLR-7993-test.patch
        3 kB
        Bill Bell
      3. SOLR-7993.patch
        5 kB
        Shalin Shekhar Mangar

        Issue Links

          Activity

          Hide
          shalinmangar Shalin Shekhar Mangar added a comment -

          Thanks everyone!

          Show
          shalinmangar Shalin Shekhar Mangar added a comment - Thanks everyone!
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1710362 from shalin@apache.org in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1710362 ]

          SOLR-7993: Raw json output for fields stopped working in 5.3.0 when requested fields do not include the unique key field name

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1710362 from shalin@apache.org in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1710362 ] SOLR-7993 : Raw json output for fields stopped working in 5.3.0 when requested fields do not include the unique key field name
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1710361 from shalin@apache.org in branch 'dev/trunk'
          [ https://svn.apache.org/r1710361 ]

          SOLR-7993: Raw json output for fields stopped working in 5.3.0 when requested fields do not include the unique key field name

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1710361 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1710361 ] SOLR-7993 : Raw json output for fields stopped working in 5.3.0 when requested fields do not include the unique key field name
          Hide
          shalinmangar Shalin Shekhar Mangar added a comment -

          Thanks William Bell. I had to remove the id field in 'fl' in your test to reproduce this bug:

          SolrQueryRequest req = req("q", "*:*", "fl", "id,subject:[json]", "wt", "json");
          

          to

          SolrQueryRequest req = req("q", "*:*", "fl", "subject:[json]", "wt", "json");
          

          This patch combines the modified test and the proposed fix.

          Show
          shalinmangar Shalin Shekhar Mangar added a comment - Thanks William Bell . I had to remove the id field in 'fl' in your test to reproduce this bug: SolrQueryRequest req = req( "q" , "*:*" , "fl" , "id,subject:[json]" , "wt" , "json" ); to SolrQueryRequest req = req( "q" , "*:*" , "fl" , "subject:[json]" , "wt" , "json" ); This patch combines the modified test and the proposed fix.
          Hide
          billnbell Bill Bell added a comment -

          Test for [json]

          Show
          billnbell Bill Bell added a comment - Test for [json]
          Hide
          billnbell Bill Bell added a comment -

          Reopening to get committed

          Show
          billnbell Bill Bell added a comment - Reopening to get committed
          Hide
          billnbell Bill Bell added a comment -

          Ryan - please check into trunk and 5.4 it works...!!!

          Please don't mark it resolved unless you check in.

          Show
          billnbell Bill Bell added a comment - Ryan - please check into trunk and 5.4 it works...!!! Please don't mark it resolved unless you check in.
          Hide
          erickerickson Erick Erickson added a comment -

          Wait, why is this marked "fixed"? There are no commit messages so either someone committed with without mentioning the JIRA or it wasn't committed anywhere.

          Or was it fixed in one of the related issues?

          This change also isn't in the trunk code.

          Show
          erickerickson Erick Erickson added a comment - Wait, why is this marked "fixed"? There are no commit messages so either someone committed with without mentioning the JIRA or it wasn't committed anywhere. Or was it fixed in one of the related issues? This change also isn't in the trunk code.
          Hide
          billnbell Bill Bell added a comment -

          Can we release this in 5.3.1 ?

          Show
          billnbell Bill Bell added a comment - Can we release this in 5.3.1 ?
          Show
          billnbell Bill Bell added a comment - - edited To test this prior to the patch: 1. http://localhost:8983/solr/provider/select?q=*%3A*&wt=json&indent=true&fl=provider_json:[json ] This returns no fields. 2. http://localhost:8983/solr/provider/select?q=*%3A*&wt=json&indent=true&fl=provider_json:[json],provider_json This returns provider_json in RAW. With the patch: 3. http://localhost:8983/solr/provider/select?q=*%3A*&wt=json&indent=true&fl=provider_json:[json ] This returns provider_json in raw json.
          Hide
          billnbell Bill Bell added a comment -

          Ryan,

          I can confirm this works!! I tested multiple JSON fields, 1, 2...

          We should open a new JIRA ticket for another issue... Less pressing.

          Show
          billnbell Bill Bell added a comment - Ryan, I can confirm this works!! I tested multiple JSON fields, 1, 2... We should open a new JIRA ticket for another issue... Less pressing.
          Hide
          ryantxu Ryan McKinley added a comment -

          Here is a patch I think will fix things for you – but i have been unable to get a test that will reproduce

          Show
          ryantxu Ryan McKinley added a comment - Here is a patch I think will fix things for you – but i have been unable to get a test that will reproduce
          Hide
          billnbell Bill Bell added a comment - - edited

          Yes it works with *.

          It also will show the Raw Json if we add it 2 times like below:

          http://localhost:8983/solr/provider/select?q=*%3A*&wt=json&fl=provider_json:[json],provider_json

          But our code does not add it 2 times... So we need a patch.

          We need a unit test for that... Can we get a patch ?

          Show
          billnbell Bill Bell added a comment - - edited Yes it works with *. It also will show the Raw Json if we add it 2 times like below: http://localhost:8983/solr/provider/select?q=*%3A*&wt=json&fl=provider_json:[json],provider_json But our code does not add it 2 times... So we need a patch. We need a unit test for that... Can we get a patch ?
          Hide
          ryantxu Ryan McKinley added a comment -

          does the json show up if you include all fields:

            fl=provider_json:[json],*
          
          Show
          ryantxu Ryan McKinley added a comment - does the json show up if you include all fields: fl=provider_json:[json],*
          Hide
          billnbell Bill Bell added a comment -

          Info.

          {
          "responseHeader":{
          "status":0,
          "QTime":31,
          "params":{
          "q":":",
          "indent":"true",
          "fl":"provider_json:[json]",
          "wt":"json"}},
          "response":{"numFound":2903672,"start":0,"docs":[
          {},
          {},
          {},
          {},
          {},
          {},
          {},
          {},
          {},
          {}]
          }}

          Show
          billnbell Bill Bell added a comment - Info. { "responseHeader":{ "status":0, "QTime":31, "params":{ "q":" : ", "indent":"true", "fl":"provider_json: [json] ", "wt":"json"}}, "response":{"numFound":2903672,"start":0,"docs":[ {}, {}, {}, {}, {}, {}, {}, {}, {}, {}] }}
          Hide
          billnbell Bill Bell added a comment -

          Linked

          Show
          billnbell Bill Bell added a comment - Linked

            People

            • Assignee:
              shalinmangar Shalin Shekhar Mangar
              Reporter:
              billnbell Bill Bell
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development