Solr
  1. Solr
  2. SOLR-3569

distributed debug is empty when no match to query

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0
    • Component/s: None
    • Labels:
      None

      Description


      If a query matches 0 documents, the "debug" information for a distributed query will be empty - ie: no information on timing, or (most importantly for many people) query parsing.

        Issue Links

          Activity

          Hide
          Hoss Man added a comment -

          discovered this while helping someone on IRC. trivial to reproduce using the example, compare...

          http://localhost:8983/solr/select?q=foo_s:basdfasd&debugQuery=true&wt=json&indent=true&shards=localhost:8983/solr

          {
            "responseHeader":{
              "status":0,
              "QTime":11,
              "params":{
                "debugQuery":"true",
                "shards":"localhost:8983/solr",
                "indent":"true",
                "wt":"json",
                "q":"foo_s:basdfasd"}},
            "response":{"numFound":0,"start":0,"docs":[]
            },
            "debug":{
              "explain":{}}}
          

          ...with the non-distrib version...

          http://localhost:8983/solr/select?q=foo_s:basdfasd&debugQuery=true&wt=json&indent=true

          {
            "responseHeader":{
              "status":0,
              "QTime":0,
              "params":{
                "debugQuery":"true",
                "indent":"true",
                "wt":"json",
                "q":"foo_s:basdfasd"}},
            "response":{"numFound":0,"start":0,"docs":[]
            },
            "debug":{
              "rawquerystring":"foo_s:basdfasd",
              "querystring":"foo_s:basdfasd",
              "parsedquery":"foo_s:basdfasd",
              "parsedquery_toString":"foo_s:basdfasd",
              "explain":{},
              "QParser":"LuceneQParser",
              "timing":{
                "time":0.0,
                "prepare":{
                  "time":0.0,
                  "org.apache.solr.handler.component.QueryComponent":{
                    "time":0.0},
                  "org.apache.solr.handler.component.FacetComponent":{
                    "time":0.0},
                  "org.apache.solr.handler.component.MoreLikeThisComponent":{
                    "time":0.0},
                  "org.apache.solr.handler.component.HighlightComponent":{
                    "time":0.0},
                  "org.apache.solr.handler.component.StatsComponent":{
                    "time":0.0},
                  "org.apache.solr.handler.component.DebugComponent":{
                    "time":0.0}},
                "process":{
                  "time":0.0,
                  "org.apache.solr.handler.component.QueryComponent":{
                    "time":0.0},
                  "org.apache.solr.handler.component.FacetComponent":{
                    "time":0.0},
                  "org.apache.solr.handler.component.MoreLikeThisComponent":{
                    "time":0.0},
                  "org.apache.solr.handler.component.HighlightComponent":{
                    "time":0.0},
                  "org.apache.solr.handler.component.StatsComponent":{
                    "time":0.0},
                  "org.apache.solr.handler.component.DebugComponent":{
                    "time":0.0}}}}}
          
          Show
          Hoss Man added a comment - discovered this while helping someone on IRC. trivial to reproduce using the example, compare... http://localhost:8983/solr/select?q=foo_s:basdfasd&debugQuery=true&wt=json&indent=true&shards=localhost:8983/solr { "responseHeader":{ "status":0, "QTime":11, "params":{ "debugQuery":"true", "shards":"localhost:8983/solr", "indent":"true", "wt":"json", "q":"foo_s:basdfasd"}}, "response":{"numFound":0,"start":0,"docs":[] }, "debug":{ "explain":{}}} ...with the non-distrib version... http://localhost:8983/solr/select?q=foo_s:basdfasd&debugQuery=true&wt=json&indent=true { "responseHeader":{ "status":0, "QTime":0, "params":{ "debugQuery":"true", "indent":"true", "wt":"json", "q":"foo_s:basdfasd"}}, "response":{"numFound":0,"start":0,"docs":[] }, "debug":{ "rawquerystring":"foo_s:basdfasd", "querystring":"foo_s:basdfasd", "parsedquery":"foo_s:basdfasd", "parsedquery_toString":"foo_s:basdfasd", "explain":{}, "QParser":"LuceneQParser", "timing":{ "time":0.0, "prepare":{ "time":0.0, "org.apache.solr.handler.component.QueryComponent":{ "time":0.0}, "org.apache.solr.handler.component.FacetComponent":{ "time":0.0}, "org.apache.solr.handler.component.MoreLikeThisComponent":{ "time":0.0}, "org.apache.solr.handler.component.HighlightComponent":{ "time":0.0}, "org.apache.solr.handler.component.StatsComponent":{ "time":0.0}, "org.apache.solr.handler.component.DebugComponent":{ "time":0.0}}, "process":{ "time":0.0, "org.apache.solr.handler.component.QueryComponent":{ "time":0.0}, "org.apache.solr.handler.component.FacetComponent":{ "time":0.0}, "org.apache.solr.handler.component.MoreLikeThisComponent":{ "time":0.0}, "org.apache.solr.handler.component.HighlightComponent":{ "time":0.0}, "org.apache.solr.handler.component.StatsComponent":{ "time":0.0}, "org.apache.solr.handler.component.DebugComponent":{ "time":0.0}}}}}
          Hide
          David Bowen added a comment -

          I've been annoyed by this too.

          Here is a patch which adds query-debug info when there are no results from the shards.

          Show
          David Bowen added a comment - I've been annoyed by this too. Here is a patch which adds query-debug info when there are no results from the shards.
          Hide
          David Bowen added a comment -

          With the patch, the debug output in the distributed case now looks like this:

          http://localhost:8983/solr/select?q=foo_s:basdfasd&debugQuery=true&wt=json&indent=true&shards=localhost:8983/solr

          {
            "responseHeader":{
              "status":0,
              "QTime":5,
              "params":{
                "debugQuery":"true",
                "shards":"localhost:8983/solr",
                "indent":"true",
                "wt":"json",
                "q":"foo_s:basdfasd"}},
            "response":{"numFound":0,"start":0,"maxScore":0.0,"docs":[]
            },
            "debug":{
              "rawquerystring":"foo_s:basdfasd",
              "querystring":"foo_s:basdfasd",
              "parsedquery":"foo_s:basdfasd",
              "parsedquery_toString":"foo_s:basdfasd",
              "QParser":"LuceneQParser",
              "explain":{}}}
          

          so it is missing any timing information, but that does not seem to be useful anyway in the case of no results.

          Show
          David Bowen added a comment - With the patch, the debug output in the distributed case now looks like this: http://localhost:8983/solr/select?q=foo_s:basdfasd&debugQuery=true&wt=json&indent=true&shards=localhost:8983/solr { "responseHeader":{ "status":0, "QTime":5, "params":{ "debugQuery":"true", "shards":"localhost:8983/solr", "indent":"true", "wt":"json", "q":"foo_s:basdfasd"}}, "response":{"numFound":0,"start":0,"maxScore":0.0,"docs":[] }, "debug":{ "rawquerystring":"foo_s:basdfasd", "querystring":"foo_s:basdfasd", "parsedquery":"foo_s:basdfasd", "parsedquery_toString":"foo_s:basdfasd", "QParser":"LuceneQParser", "explain":{}}} so it is missing any timing information, but that does not seem to be useful anyway in the case of no results.
          Hide
          Hoss Man added a comment - - edited

          DELETED – wrong issue

          Show
          Hoss Man added a comment - - edited DELETED – wrong issue
          Hide
          Hoss Man added a comment -

          David: thanks for the patch!

          Definitely better then the current situation.

          Committed revision 1384597.
          Committed revision 1384599. - 4x

          Show
          Hoss Man added a comment - David: thanks for the patch! Definitely better then the current situation. Committed revision 1384597. Committed revision 1384599. - 4x
          Hide
          Commit Tag Bot added a comment -

          [branch_4x commit] Chris M. Hostetter
          http://svn.apache.org/viewvc?view=revision&revision=1384599

          SOLR-3569: Fixed debug output on distributed requests when there are no results found (merge r1384597)

          Show
          Commit Tag Bot added a comment - [branch_4x commit] Chris M. Hostetter http://svn.apache.org/viewvc?view=revision&revision=1384599 SOLR-3569 : Fixed debug output on distributed requests when there are no results found (merge r1384597)
          Hide
          Uwe Schindler added a comment -

          Closed after release.

          Show
          Uwe Schindler added a comment - Closed after release.

            People

            • Assignee:
              Hoss Man
              Reporter:
              Hoss Man
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development