Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alphanumeric sort Solr field #891

Closed
ahankinson opened this issue Feb 21, 2020 · 0 comments
Closed

Alphanumeric sort Solr field #891

ahankinson opened this issue Feb 21, 2020 · 0 comments

Comments

@ahankinson
Copy link
Contributor

The current configuration for Solr has a text field for alphanumeric-friendly sort:

https://github.com/rism-ch/muscat/blob/master/solr/configsets/sunspot/conf/schema.xml#L115-L144

This can be switched out with a built-in field type that provides the same functionality:

<fieldType name="sort" class="solr.ICUCollationField" locale="" numeric="true" strength="secondary" sortMissingLast="true" />

This also provides locale-sensitive sorting as an extra bonus. It requires the ICU Collation library extras to be loaded. Documentation for this field type is available here:

https://lucene.apache.org/solr/guide/6_6/language-analysis.html#LanguageAnalysis-UnicodeCollation

This has been tested and works quite well in production.

xhero added a commit that referenced this issue Jun 28, 2021
* develop:
  #891 use better field analyzer for shelfmark
  ...and more formatting
  As usual, fix formatting
  Add more solr installation notes
xhero added a commit that referenced this issue Jun 28, 2021
* develop:
  #891 use better field analyzer for shelfmark
  ...and more formatting
  As usual, fix formatting
  Add more solr installation notes
@xhero xhero closed this as completed May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants