Custom Collection Sort Order

It is possible to define a custom sort order for a collection in Islandora. You may need to work with your LYRASIS technical support people to get everything configured properly, but once done, you can sort your collections according to their particular metadata.

First, log in to your Islandora, navigate to the collection you wish to sort, and click on the "Manage" tab.

manage tab in the collection admin controls

Next, click on the "Collection" tab in the admin overlay.

collection tab at the top of the admin overlay

Then, click the "Set Solr Sort String" tab in the left-hand navigation. If you don't see this tab, ask your support person to "enable Solr Display Generation in the Collection Solution Pack" (and to check "Hide child objects in Solr results" in the Compound Object Solution Pack, while they are at it).

Set Solr Sort String tab in the left-hand navigation of the admin overlay

Finally, begin entering the name of the field you want to sort on in the "Solr Collection Sort String" field. This will open an autocomplete list containing available fields that contain what you have typed so far. These fields come from the solr index of your metadata, so they may look unfamiliar. A good strategy is to begin searching with the string "_ss" (for "sort string"). This will bring up the solr fields that are of type "More Sortable String." From there, you can look for fields that appear to match the metadata fields you want to use for your sort. Frankly, this may take some guesswork.

selection of fields for sorting

Once you have selected the field you want to sort on, the autocomplete will disappear, leaving the field name in the textbox. Add either "asc" or "desc" to sort in ascending or descending order, then click "Apply".

apply button

The admin overlay will return to the Collection Policy screen and you should see a message confirming your new sort string for the collection.

confirmation message for changes to collection

You can now close the admin overlay and check the results of your work. If you get an error message, or if the collection does not sort in the order you had hoped, it's easy to fix. Simply go back and select a different solr field upon which to sort, or clear the "Solr Collection Sort String" textbox to go back to the default sort order.

Do note that your results will be better if you have complete and consistent metadata for all the items in your collection. It may be necessary to do some cleanup in order to get the results you want. Also, if the collection you want to sort has undergone a lot of metadata editing, it is possible that it may need to be reindexed before it will sort as expected. If you are sure your metadata is in order, but you still aren't getting the results you expect, reach out to your support person for help.

Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk