hudmol/archivesspace — pull request #290 by payten (2013-02-23 09:20:02+00:00)
Title: Faceting and Sorting (in the frontend)

Hi guys,

Here's my first attempt at the faceting and sorting.

Facets...
- @marktriggs helped me initially with these and helped with setting up facets for Subjects
- From there I've added facets for record type and accession date (by year)...
- I've added facets/filters to the accession browse list and the main search (via the navbar)

Sorting
- have added a title_sort field to the index of type 'string' as the tokenised field 'title' didn't play nice
- we can currently sort by title and record type... clicking the header of the table will first sort in ascending order, then descending.. and then the third mode is 'off' or no sort.

Backend: I've added some new parameters to the backend endpoints to support these new requirements.

To help manipulate and make sense of the search data, I've added a SearchResultData object that holds the search hash returned from the backed. Here I've added some helper methods to access the filters, criteria and results. I'm not super sure about this.. perhaps is could inherit from Hash?

Thanks