curationexperts / cypripedium

A Hyrax 3 application for the Federal Reserve Bank of Minneapolis
2 stars 3 forks source link

Sort volume and issue numbers numerically instead of alphabetically #584

Closed mark-dce closed 7 months ago

mark-dce commented 7 months ago

ISSUE When a user sorted by issue number, the resulting lists were sorted in alphabetic rather than numeric order: e.g. we were getting this:

      "1"
      "10"
      "105"
      "2"
      "40"
      "5"

instead of this

       1
       2
       5
       10
       40
       105

SOLUTION Instead of sorting on the string field, parse the volume and issue numbers separately and index them numerically.

Once we have the values in separate indexes, we can sort on the numeric fields to get the desired search result order.

BEFORE

image

AFTER

image