Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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
        5 kB
        Shalin Shekhar Mangar
      2. SOLR-7993.patch
        0.6 kB
        Ryan McKinley
      3. SOLR-7993-test.patch
        3 kB
        Bill Bell

        Issue Links

          Activity

          Hide
          Bill Bell added a comment -

          Linked

          Show
          Bill Bell added a comment - Linked
          Hide
          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
          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
          Ryan McKinley added a comment -

          does the json show up if you include all fields:

            fl=provider_json:[json],*
          
          Show
          Ryan McKinley added a comment - does the json show up if you include all fields: fl=provider_json:[json],*
          Hide
          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
          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
          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
          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
          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
          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
          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
          Bill Bell added a comment -

          Can we release this in 5.3.1 ?

          Show
          Bill Bell added a comment - Can we release this in 5.3.1 ?
          Hide
          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
          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
          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
          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
          Bill Bell added a comment -

          Reopening to get committed

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

          Test for [json]

          Show
          Bill Bell added a comment - Test for [json]
          Hide
          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
          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
          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
          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
          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
          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
          Shalin Shekhar Mangar added a comment -

          Thanks everyone!

          Show
          Shalin Shekhar Mangar added a comment - Thanks everyone!

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development