Solr
  1. Solr
  2. SOLR-3840

XML query response display is unreadable in Solr Admin Query UI

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Implemented
    • Affects Version/s: 4.0-BETA
    • Fix Version/s: 4.1
    • Component/s: web gui
    • Labels:
      None
    • Environment:

      Google Chrome, Windows 7 - Firefox as well

      Description

      If I execute a query in the Solr Admin Query UI, the default XML "writer" displays only the raw text of the Solr response XML element values, but none of the XML syntax itself, rendering the response display on the Query page almost completely useless. JSON, Ruby, et al display very reasonably formatted output, but XML does not.

      You can click on the icon next to the generated query URL to display the response in a browser tab of its own and then it does display the XML very reasonably, but the framed display on the query page is simply not readable.

      My recollection is that the old UI had this same problem.

      1. Query-UI-XML-unreadable.png
        162 kB
        Jack Krupansky
      2. SOLR-3840.patch
        27 kB
        Stefan Matheis (steffkes)
      3. SOLR-3840.patch
        26 kB
        Stefan Matheis (steffkes)
      4. SOLR-3840.patch
        3 kB
        Stefan Matheis (steffkes)
      5. solr-admin-ui-query-highlight-json.png
        123 kB
        Stefan Matheis (steffkes)
      6. solr-admin-ui-query-highlight-json.png
        123 kB
        Stefan Matheis (steffkes)
      7. solr-admin-ui-query-highlight-xml.png
        151 kB
        Stefan Matheis (steffkes)

        Activity

        Hide
        Hoss Man added a comment -

        I can't reproduce the problem description on the 4x branch – the frame embedded in the search UI page shows me the same xml appearance as when it's loaded in it's own tab. sounds like a browser specific behavior (details on your browser would be appreciated)

        Removing fixVersion=4.0 as this does not seem like a significant enough issue to warrant impeeding momentum towards the (hopefully) rapidly approaching release.

        Show
        Hoss Man added a comment - I can't reproduce the problem description on the 4x branch – the frame embedded in the search UI page shows me the same xml appearance as when it's loaded in it's own tab. sounds like a browser specific behavior (details on your browser would be appreciated) Removing fixVersion=4.0 as this does not seem like a significant enough issue to warrant impeeding momentum towards the (hopefully) rapidly approaching release.
        Hide
        Jack Krupansky added a comment -

        I'm running Google Chrome on Windows 7. I attached the screenshot.

        I tried IE 9, but the dashboard is completely dysfunctional there - I'll file a separate issue.

        Show
        Jack Krupansky added a comment - I'm running Google Chrome on Windows 7. I attached the screenshot. I tried IE 9, but the dashboard is completely dysfunctional there - I'll file a separate issue.
        Hide
        Jack Krupansky added a comment -

        Issue is the same with a fresh download of Firefox.

        Show
        Jack Krupansky added a comment - Issue is the same with a fresh download of Firefox.
        Hide
        Stefan Matheis (steffkes) added a comment -

        Jepp, that's right .. depends a bit on your Browser, if it will render the XML correctly .. or not :/

        At the Beginning we thought about using the same (clientside) XML-Renderer like we have in place for displaying the schema.xml/solrconfig.xml, but if we do so the browser features to expand/collapse the xml-tree (or whatever your browser has implemented) are gone.

        And right know, i don't have a chance to detect if the client is able to render xml as xml or not. what we could think about, is offering a second view: one nativ, the second rendered ... so the user could decide which one to use?

        Show
        Stefan Matheis (steffkes) added a comment - Jepp, that's right .. depends a bit on your Browser, if it will render the XML correctly .. or not :/ At the Beginning we thought about using the same (clientside) XML-Renderer like we have in place for displaying the schema.xml/solrconfig.xml, but if we do so the browser features to expand/collapse the xml-tree (or whatever your browser has implemented) are gone. And right know, i don't have a chance to detect if the client is able to render xml as xml or not. what we could think about, is offering a second view: one nativ, the second rendered ... so the user could decide which one to use?
        Hide
        Jack Krupansky added a comment - - edited

        Just to be clear, both Chrome and Firefox on Windows know how to render XML, and in fact if I click on the icon next to the query URL the XML displays properly when it is a page of its own in the browser.

        I don't have any browser add-ons - I use the browsers exactly as they are downloaded. Is there maybe some add-on that might be needed? Or maybe some option(s) that need to be enabled or disabled?

        I would add that when I do display the XML by clicking on the URL icon, Chrome does also inform me that "This XML file does not appear to have any style information associated with it. The document tree is shown below." It still formats the XML properly though. I get the same exact message in Firefox if I click on the URL icon.

        Somebody must have some clue as to while this specific feature of the Solr UI would behave differently on my system. My current suspicion is that the Solr UI is dependent on some add-on that your average Solr committer happens to have also installed.

        Show
        Jack Krupansky added a comment - - edited Just to be clear, both Chrome and Firefox on Windows know how to render XML, and in fact if I click on the icon next to the query URL the XML displays properly when it is a page of its own in the browser. I don't have any browser add-ons - I use the browsers exactly as they are downloaded. Is there maybe some add-on that might be needed? Or maybe some option(s) that need to be enabled or disabled? I would add that when I do display the XML by clicking on the URL icon, Chrome does also inform me that "This XML file does not appear to have any style information associated with it. The document tree is shown below." It still formats the XML properly though. I get the same exact message in Firefox if I click on the URL icon. Somebody must have some clue as to while this specific feature of the Solr UI would behave differently on my system. My current suspicion is that the Solr UI is dependent on some add-on that your average Solr committer happens to have also installed.
        Hide
        Alexandre Rafalovitch added a comment -

        I think this might be related to http://code.google.com/p/chromium/issues/detail?id=434 (see message at the bottom). Chrome can display XML, but not if it is in an iFrame.

        In addition, Firefox does display XML - with folding too - but it puts an ugly big banner on top with the 'missing style' message.

        Maybe the default return type should be changed at least for Admin. I vote for Ruby/indented. Not a default return type at the backend, just start the UI page with those options pre-selected.

        Show
        Alexandre Rafalovitch added a comment - I think this might be related to http://code.google.com/p/chromium/issues/detail?id=434 (see message at the bottom). Chrome can display XML, but not if it is in an iFrame. In addition, Firefox does display XML - with folding too - but it puts an ugly big banner on top with the 'missing style' message. Maybe the default return type should be changed at least for Admin. I vote for Ruby/indented. Not a default return type at the backend, just start the UI page with those options pre-selected.
        Hide
        Yonik Seeley added a comment -

        I vote for Ruby/indented.

        JSON is much more standard... but ruby does have a big advantage for debugging in that newlines can be embedded in strings (common in explain output, exception traces, etc) and so it looks much better.

        Show
        Yonik Seeley added a comment - I vote for Ruby/indented. JSON is much more standard... but ruby does have a big advantage for debugging in that newlines can be embedded in strings (common in explain output, exception traces, etc) and so it looks much better.
        Hide
        Stefan Matheis (steffkes) added a comment -

        The point is exactly as Alexandre stated, the rendering does not work by default for content in iframes .. afaik the can be enabled as 'advanced setting', but this nothing i'd like to build on.

        first draft attached, which uses the same client-rendering as we do for schema/config.

        Show
        Stefan Matheis (steffkes) added a comment - The point is exactly as Alexandre stated, the rendering does not work by default for content in iframes .. afaik the can be enabled as 'advanced setting', but this nothing i'd like to build on. first draft attached, which uses the same client-rendering as we do for schema/config.
        Hide
        Stefan Matheis (steffkes) added a comment -

        Updated Patch, includes Highlighting for XML as well as JSON (see attached screenshots for samples)

        Show
        Stefan Matheis (steffkes) added a comment - Updated Patch, includes Highlighting for XML as well as JSON (see attached screenshots for samples)
        Hide
        Yonik Seeley added a comment -

        Sweet!

        About the JSON colors though - the red text kind of stands out a bit and makes you think "error". Many syntax highlighters use green for quoted strings. And perhaps we could use blue for the map keys (which currently look sort of darkish green/gray?)

        Anyway - just my first impressions - I'd like to hear what other people think are good colors (esp with the JSON which I hope is the default!)

        Show
        Yonik Seeley added a comment - Sweet! About the JSON colors though - the red text kind of stands out a bit and makes you think "error". Many syntax highlighters use green for quoted strings. And perhaps we could use blue for the map keys (which currently look sort of darkish green/gray?) Anyway - just my first impressions - I'd like to hear what other people think are good colors (esp with the JSON which I hope is the default!)
        Hide
        Stefan Matheis (steffkes) added a comment -

        Ah, well .. yes .. of course! let me know which one you like .. perhaps you can have a look at the given themes on the highlight.js page: http://softwaremaniacs.org/media/soft/highlight/test.html ?

        Show
        Stefan Matheis (steffkes) added a comment - Ah, well .. yes .. of course! let me know which one you like .. perhaps you can have a look at the given themes on the highlight.js page: http://softwaremaniacs.org/media/soft/highlight/test.html ?
        Hide
        Ryan McKinley added a comment -

        +1 for XCode

        as always, looks great Stefan!

        Show
        Ryan McKinley added a comment - +1 for XCode as always, looks great Stefan!
        Hide
        Stefan Matheis (steffkes) added a comment -

        Ryan, was not completely happy with the XCode Theme :/ so i took a couple of colors from the typical "jsonview" plugins for firefox/chrome - at least for the json-format. xml stays the same for now, github-ish style .. otherwise it was too much dark in dark and not easy to see the difference between attribute and attribute's value.

        I'll go ahead and commit this soon .. if anyone has suggestions on specific color improvements, let me know

        Show
        Stefan Matheis (steffkes) added a comment - Ryan, was not completely happy with the XCode Theme :/ so i took a couple of colors from the typical "jsonview" plugins for firefox/chrome - at least for the json-format. xml stays the same for now, github-ish style .. otherwise it was too much dark in dark and not easy to see the difference between attribute and attribute's value. I'll go ahead and commit this soon .. if anyone has suggestions on specific color improvements, let me know
        Hide
        Stefan Matheis (steffkes) added a comment -

        trunk: r1429288
        branch_4x: r1429289

        Show
        Stefan Matheis (steffkes) added a comment - trunk: r1429288 branch_4x: r1429289
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] Stefan Matheis
        http://svn.apache.org/viewvc?view=revision&revision=1429289

        SOLR-3840: XML query response display is unreadable in Solr Admin Query UI (merge r1429288)

        Show
        Commit Tag Bot added a comment - [branch_4x commit] Stefan Matheis http://svn.apache.org/viewvc?view=revision&revision=1429289 SOLR-3840 : XML query response display is unreadable in Solr Admin Query UI (merge r1429288)
        Hide
        Commit Tag Bot added a comment -

        [trunk commit] Stefan Matheis
        http://svn.apache.org/viewvc?view=revision&revision=1429288

        SOLR-3840: XML query response display is unreadable in Solr Admin Query UI

        Show
        Commit Tag Bot added a comment - [trunk commit] Stefan Matheis http://svn.apache.org/viewvc?view=revision&revision=1429288 SOLR-3840 : XML query response display is unreadable in Solr Admin Query UI
        Hide
        Jack Krupansky added a comment -

        Looks great now! Thanks for this nice improvement of 4.1 over 4.0.

        I did an ant run-example with a fresh svn co of branch_4x.

        Show
        Jack Krupansky added a comment - Looks great now! Thanks for this nice improvement of 4.1 over 4.0. I did an ant run-example with a fresh svn co of branch_4x.

          People

          • Assignee:
            Stefan Matheis (steffkes)
            Reporter:
            Jack Krupansky
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development