Solr
  1. Solr
  2. SOLR-3711

Velocity: Break or truncate long strings in facet output

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0, 6.0
    • Component/s: Response Writers
    • Labels:

      Description

      In Solritas /browse GUI, if facets contain very long strings (such as content-type tend to do), currently the too long text runs over the main column and it is not pretty.

      Perhaps inserting a Soft Hyphen ­ (http://en.wikipedia.org/wiki/Soft_hyphen) at position N in very long terms is a solution?

      1. SOLR-3711.patch
        2 kB
        Erik Hatcher

        Activity

        Hide
        Robert Muir added a comment -

        rmuir20120906-bulk-40-change

        Show
        Robert Muir added a comment - rmuir20120906-bulk-40-change
        Hide
        Hoss Man added a comment -

        removing fixVersion=4.0 since there is no evidence that anyone is currently working on this issue. (this can certainly be revisited if volunteers step forward)

        Show
        Hoss Man added a comment - removing fixVersion=4.0 since there is no evidence that anyone is currently working on this issue. (this can certainly be revisited if volunteers step forward)
        Hide
        Erik Hatcher added a comment - - edited

        Jan Høydahl - how's this? If this general idea works for you, I will generalize it to work for all facet labels (not just facet fields). What's the best truncation size and suffix string? I used 20 and the default of "..." in this initial patch. The title of the facet filter links, on mouse hover, is the full untruncated value.

        Show
        Erik Hatcher added a comment - - edited Jan Høydahl - how's this? If this general idea works for you, I will generalize it to work for all facet labels (not just facet fields). What's the best truncation size and suffix string? I used 20 and the default of "..." in this initial patch. The title of the facet filter links, on mouse hover, is the full untruncated value.
        Hide
        Jan Høydahl added a comment -

        No strong opinions, go ahead

        Show
        Jan Høydahl added a comment - No strong opinions, go ahead
        Hide
        Erik Hatcher added a comment -

        I'm not seeing this problem on trunk (using bin/solr start -e schemaless; then bin/post gettingstarted test.csv) with a simple "id,facet_s\n1,really long .............. string" and going to http://localhost:8983/solr/gettingstarted/browse?facet.field=facet_s

        I will still add the DisplayTool to the Velocity context, but the current UI wraps the long text in the facet column in both Firefox and Chrome.

        Show
        Erik Hatcher added a comment - I'm not seeing this problem on trunk (using bin/solr start -e schemaless; then bin/post gettingstarted test.csv) with a simple "id,facet_s\n1,really long .............. string" and going to http://localhost:8983/solr/gettingstarted/browse?facet.field=facet_s I will still add the DisplayTool to the Velocity context, but the current UI wraps the long text in the facet column in both Firefox and Chrome.
        Hide
        ASF subversion and git services added a comment -

        Commit 1648041 from Erik Hatcher in branch 'dev/trunk'
        [ https://svn.apache.org/r1648041 ]

        SOLR-3711: Truncate long strings in /browse field facets

        Show
        ASF subversion and git services added a comment - Commit 1648041 from Erik Hatcher in branch 'dev/trunk' [ https://svn.apache.org/r1648041 ] SOLR-3711 : Truncate long strings in /browse field facets
        Hide
        ASF subversion and git services added a comment -

        Commit 1648042 from Erik Hatcher in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1648042 ]

        SOLR-3711: Truncate long strings in /browse field facets

        Show
        ASF subversion and git services added a comment - Commit 1648042 from Erik Hatcher in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1648042 ] SOLR-3711 : Truncate long strings in /browse field facets
        Hide
        ASF subversion and git services added a comment -

        Commit 1648043 from Erik Hatcher in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1648043 ]

        SOLR-3711: Truncate long strings in /browse field facets

        Show
        ASF subversion and git services added a comment - Commit 1648043 from Erik Hatcher in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1648043 ] SOLR-3711 : Truncate long strings in /browse field facets
        Hide
        ASF subversion and git services added a comment -

        Commit 1648044 from Erik Hatcher in branch 'dev/trunk'
        [ https://svn.apache.org/r1648044 ]

        SOLR-3711: Truncate long strings in field facets in generic facet_fields.vm

        Show
        ASF subversion and git services added a comment - Commit 1648044 from Erik Hatcher in branch 'dev/trunk' [ https://svn.apache.org/r1648044 ] SOLR-3711 : Truncate long strings in field facets in generic facet_fields.vm
        Hide
        Erik Hatcher added a comment -

        When a string has no whitespace it does not wrap (like content_type as Jan mentioned) - this has been fixed on both trunk and 5x.

        Show
        Erik Hatcher added a comment - When a string has no whitespace it does not wrap (like content_type as Jan mentioned) - this has been fixed on both trunk and 5x.
        Hide
        Anshum Gupta added a comment -

        Bulk close after 5.0 release.

        Show
        Anshum Gupta added a comment - Bulk close after 5.0 release.

          People

          • Assignee:
            Erik Hatcher
            Reporter:
            Jan Høydahl
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development