Uploaded image for project: 'Islandora'
  1. Islandora
  2. ISLANDORA-1588

Add sorting to the Solr collection display query backend




      Bit of an inconsistency between the SPARQL and Solr collection display backends - the SPARQL backend uses an ORDER BY to sort the results, whereas the Solr backend just goes by the default Solr sort, whatever that may be.

      This isn't really optimal; it means that in order to get an alphabetical (or alphanumerical or what have you) sort into the collection display, you're forcing Solr searches to be alphanumerical as well. Otherwise, your collection display winds up being score-based. It's not a great choice to have to make.

      What's more, the way one collection is sorted may not make sense for a separate collection with different metadata that's indexed in a different way.

      I'd like to set up the Solr collection display backend to run sorting like this:

      • Use a collection-specific sort string if available
      • If none is available, use the default collection display backend sort string.
      • If that isn't set either, use the default Solr sort.

      -Use Case-
      An institution would like to use the Solr collection display backend, but would also like to sort their collections alphabetically, or alphanumerically, or by some other scheme, rather than in the same way search results are sorted, without impacting the way search results are sorted.

      -Technical Approach-
      A slight modification to the existing solr collection display backend would have to be added to include a default sort string, if that's what's wanted.

      We should find a way as well to add this to the collection level, e.g, using a relationship on the collection that defines the sort string.

      -Test Case-
      Switch to the Solr collection display backend for collection queries.

      The collection should be sorted on:

      • the collection sort string, if it exists
      • the default collection sort string, if it doesn't exist
      • the default solr sort string, if that doesn't exist either

      If it's implemented in the above way, I don't see us running into any problems. By using those fallbacks, it won't mess around with existing installs.

      QA (... Dev? RM?) Dan
      discoverygarden inc. | Managing Digital Content




            • Assignee:
              daitken Daniel Aitken
              daitken Daniel Aitken
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: