CDRH / api

Codenamed "Apium": An API to access all public Center for Digital Research in the Humanities resources
https://cdrhdev1.unl.edu/api_frontend
MIT License
3 stars 1 forks source link

Sort for browse page: case and unicode insensitive #96

Closed karindalziel closed 2 years ago

karindalziel commented 5 years ago

Screen Shot 2019-09-06 at 10 21 09 AM

When we sort browse pages, it is case and unicode sensitive.

Ideally, we could make it sort so any diacritics sort with the ascii character that most closely matches (so ñ would be sorted with "N" etc)

I have a feeling someone has solved this already. I found a few posts about the case insensitivity. i.e. https://www.technetexperts.com/web/case-insensitive-sorting-in-elasticsearch/ (not the nest post, just an example)

jduss4 commented 4 years ago

Related to #29

jduss4 commented 4 years ago

Use this for ascii conversions: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-asciifolding-tokenfilter.html

jduss4 commented 4 years ago

The custom analyzer they show as their example does basically exactly what we want it to do, although I'd have to read up on the character filter.

https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-custom-analyzer.html

jduss4 commented 4 years ago

Ah so I misled myself a little, the analyzers are NOT applicable to keyword fields, but it looks like they have normalizers instead: https://www.elastic.co/guide/en/elasticsearch/reference/current/normalizer.html