opensemanticsearch / open-semantic-search

Open Source research tool to search, browse, analyze and explore large document collections by Semantic Search Engine and Open Source Text Mining & Text Analytics platform (Integrates ETL for document processing, OCR for images & PDF, named entity recognition for persons, organizations & locations, metadata management by thesaurus & ontologies, search user interface & search apps for fulltext search, faceted search & knowledge graph)
https://opensemanticsearch.org
GNU General Public License v3.0
941 stars 164 forks source link

Change Default Facet Sorting in OpenSemanticSearch #472

Open jerrydeasley opened 8 months ago

jerrydeasley commented 8 months ago

I'm running OpenSemanticSearch on a Debian 11 server and I have been able to successfully import, extract, and ocr data, and can access it through the /search webpage.

The facets appear by default to be sorted by the numerical "count".

This appears to be the expected default behavior in Solr.

From the Solr Ref. Guide:

facet.sort This parameter determines the ordering of the facet field constraints. There are two options for this parameter. count Sort the constraints by count (highest count first). index Return the constraints sorted in their index order (lexicographic by indexed term). For terms in the ASCII range, this will be alphabetically sorted. The default is count if facet.limit is greater than 0, otherwise, the default is index.

I would like to change the "Path(s)" facet to appear of the /search page in Alphabetical Order but have been unable to make any headway.

It appears that the right change to /etc/solr-php-ui/config.facets.php might do the trick but I have not been able to make it work.

Any help would be greatly appreciated.