Solr
  1. Solr
  2. SOLR-522

analysis.jsp doesn't show payloads created/modified by tokenizers and tokenfilters

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: web gui
    • Labels:
      None

      Description

      Add payload content to the vebose output of the analysis.jsp page for debugging purposes.

      1. SOLR-522-analysis.jsp.patch
        2 kB
        Tricia Jenkins
      2. SOLR-522-analysis.jsp.patch
        1 kB
        Tricia Jenkins

        Issue Links

          Activity

          Hide
          Tricia Jenkins added a comment -

          Added if block to analysis.jsp which converts the Payload's byte stream directly to a String for display. This might not suit the use case of all payloads so this may need to be revisited as those emerge.

          Show
          Tricia Jenkins added a comment - Added if block to analysis.jsp which converts the Payload's byte stream directly to a String for display. This might not suit the use case of all payloads so this may need to be revisited as those emerge.
          Hide
          Tricia Jenkins added a comment -

          Modified patch uses Yonik's suggestion:

          As a useful first step for debugging purposes, it seems like the full
          hex of the raw bytes should always be output. If it seems to be
          ascii, that could be put in parens.
          example: 636f6f6c (cool)

          and incorporates Hoss' suggestion for printable Strings:

          if i were tasked with
          trying to find a way to display in HTML an arbitrary byte[] that may or
          may not be a String, i would start by attempting a String conversion, if
          that succeds and all chars in the resulting String are "printable" (
          ie: Character.isDefined(c) && ! Character.isISOCOntrol(c)) then display
          the first N chars (where N is some reasonable max size to display) ... if
          not, then just display the first N characters of the hex string
          representing the byte[].

          Show
          Tricia Jenkins added a comment - Modified patch uses Yonik's suggestion: As a useful first step for debugging purposes, it seems like the full hex of the raw bytes should always be output. If it seems to be ascii, that could be put in parens. example: 636f6f6c (cool) and incorporates Hoss' suggestion for printable Strings: if i were tasked with trying to find a way to display in HTML an arbitrary byte[] that may or may not be a String, i would start by attempting a String conversion, if that succeds and all chars in the resulting String are "printable" ( ie: Character.isDefined(c) && ! Character.isISOCOntrol(c)) then display the first N chars (where N is some reasonable max size to display) ... if not, then just display the first N characters of the hex string representing the byte[].
          Hide
          Yonik Seeley added a comment -

          I just committed this. Thanks Tricia!

          Show
          Yonik Seeley added a comment - I just committed this. Thanks Tricia!

            People

            • Assignee:
              Mike Klaas
              Reporter:
              Tricia Jenkins
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development