Closed Conal-Tuohy closed 4 years ago
A-Z order by institution's location (@wehooper will ID the element). All manuscripts results should display when clicking "Browse Manuscripts." We won't need pagination for the Browse results like we have on the current website because of facets! Yay facets.
So it the requirement here for a separate page (separate from the search page)?
I don't understand the comment about pagination and facets.
On the current (XTF-P4) site, when the user clicks on "Browse Manuscripts," the queryParser.xsl sheet determines the order of results in template match ="/", at or around line 48. It uses three components, sort-settlement, sort-collection, and sort-shelfmark, which all defined in preFilter.xsl. The preFilter definitions draw from the settlement, collection, and shelfmark elements in the document TEI headers. Basically a few years we decided that the documents would sorted by location, collection, and then shelfmark. The collection and shelfmark are fairly straightforward, but the location can present some problems because there are two Cambridge settlements, one in the UK, the other in Massachusetts, and the UK should come first, UK < USA.
I have made a few tweaks to the indexing and search system, so that a sort field can be defined in the search-fields.xml
file. I have defined a field called sort
, and I've populated it with an XPath expression which I believe captures the correct sort order:
string-join(
(
/TEI/teiHeader/fileDesc/sourceDesc/msDesc/msIdentifier/settlement,
/TEI/teiHeader/fileDesc/sourceDesc/msDesc/msIdentifier[country/@key='US']/region/@key,
/TEI/teiHeader/fileDesc/sourceDesc/msDesc/msIdentifier/altIdentifier/idno[@type='collection'],
/TEI/teiHeader/fileDesc/sourceDesc/msDesc/msIdentifier/idno
),
' '
)
I have then altered the Solr query so that it uses this sort
field to sort results. Specifically, the sort order requested is for hits in order of relevance score, and then in order of this sort field. My reasoning is that when a user searches e.g. for "gold", they will want the results in relevance order, but when they are simply browsing without any search constraints then the documents should have equal scores, and this sort order should apply.
Let me know what you think, please
@wehooper could you have a look? This seems right to me, but it would be good to have a long-time project team member to confirm.
I assuming this was reviewed per the 12/13/2019 email so I will close this issue.
By default, show "short display" of all manuscripts in A-Z order by institution