Solr
  1. Solr
  2. SOLR-4352

Velocity-base pagination should support/preserve sorting

    Details

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

      Description

      When performing /browse, the Velocity generated UI does not support sorting in the generated pagination links.

      The link_to_previous_page and link_to_next_page macros found within [apache-solr-4.0.0]/example/solr/collection1/conf/velocity/VM_global_library.vm should be modified to maintain/preserve an existing sort parameter.

      1. SOLR-4352.patch
        2 kB
        Eric Spiegelberg
      2. SOLR-4352-erik.patch
        0.9 kB
        Erik Hatcher

        Activity

        Hide
        Eric Spiegelberg added a comment -

        A patch providing one way to resole this issue.

        Show
        Eric Spiegelberg added a comment - A patch providing one way to resole this issue.
        Hide
        Erik Hatcher added a comment -

        Eric - how about this patch? It allows the sort parameter(s) to stick around on facet selections as well, not just pagination.

        Show
        Erik Hatcher added a comment - Eric - how about this patch? It allows the sort parameter(s) to stick around on facet selections as well, not just pagination.
        Hide
        Eric Spiegelberg added a comment -

        This patch is specifically for maintaining the sort parameter(s) for pagination – the Velocity template that generate the pagination links was modified. Very similar code of how to extract and maintain the sort parameter(s) could be applied to facet selections separately.

        Show
        Eric Spiegelberg added a comment - This patch is specifically for maintaining the sort parameter(s) for pagination – the Velocity template that generate the pagination links was modified. Very similar code of how to extract and maintain the sort parameter(s) could be applied to facet selections separately.
        Hide
        Erik Hatcher added a comment -

        Eric - my patch covers both facet and pagination links. Any reason not to keep sort on facet links too? Thoughts on my patch for your needs?

        Show
        Erik Hatcher added a comment - Eric - my patch covers both facet and pagination links. Any reason not to keep sort on facet links too? Thoughts on my patch for your needs?
        Hide
        Erik Hatcher added a comment -

        In your original patch, Eric, it doesn't account for multiple sort parameters nor does it URL encode the sort values. Both multiple sort and url encoding are handled in my patch.

        Show
        Erik Hatcher added a comment - In your original patch, Eric, it doesn't account for multiple sort parameters nor does it URL encode the sort values. Both multiple sort and url encoding are handled in my patch.
        Hide
        Eric Spiegelberg added a comment -

        After comparing the two patches, my patch is for a more narrow slice of functionality and does not account for the additional use cases that yours does. Yours is the way to go.

        Show
        Eric Spiegelberg added a comment - After comparing the two patches, my patch is for a more narrow slice of functionality and does not account for the additional use cases that yours does. Yours is the way to go.
        Hide
        Erik Hatcher added a comment -

        committed to both 4x and trunk

        Show
        Erik Hatcher added a comment - committed to both 4x and trunk
        Hide
        Commit Tag Bot added a comment -

        [trunk commit] Erik Hatcher
        http://svn.apache.org/viewvc?view=revision&revision=1449179

        SOLR-4352: /browse pagination now supports and preserves sort context

        Show
        Commit Tag Bot added a comment - [trunk commit] Erik Hatcher http://svn.apache.org/viewvc?view=revision&revision=1449179 SOLR-4352 : /browse pagination now supports and preserves sort context
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] Erik Hatcher
        http://svn.apache.org/viewvc?view=revision&revision=1449180

        SOLR-4352: /browse pagination now supports and preserves sort context (merged from trunk r1449179)

        Show
        Commit Tag Bot added a comment - [branch_4x commit] Erik Hatcher http://svn.apache.org/viewvc?view=revision&revision=1449180 SOLR-4352 : /browse pagination now supports and preserves sort context (merged from trunk r1449179)
        Hide
        Uwe Schindler added a comment -

        Closed after release.

        Show
        Uwe Schindler added a comment - Closed after release.

          People

          • Assignee:
            Erik Hatcher
            Reporter:
            Eric Spiegelberg
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development