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

sorting alphabetically, questions #29

Closed jduss4 closed 1 year ago

jduss4 commented 7 years ago

Right now ES returns results like this:

?facet_sort=alpha|desc

{
  alice : 20,
  charlemagne: 30,
  Abigail : 20
}

Is it possible to sort alphabetically without regard to capitalization? Also, is it possible to specify (maybe by field) whether empty values should go at the beginning or end of sorting alphabetically?

jduss4 commented 7 years ago

Looks like people mostly using custom analyzers that are added to the mapping to "lowercase" everything for the purpose of sorting.

Also: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_missing_values

jduss4 commented 7 years ago

No longer using "alpha" because then that sort doesn't work for date histograms, which use "_key". Instead using "term"

jduss4 commented 6 years ago

Moving this to milestone 2 until I get any comments from the Cather team

jduss4 commented 4 years ago

@techgique may have a lead on this, I believe he looked into analyzers dealing with capitalization, etc

wkdewey commented 1 year ago

Do we need this for Petitioning for Freedom and Whitman

karindalziel commented 1 year ago

Another related issue to this is letters with diacritics sorting to the end (see family letters)

karindalziel commented 1 year ago

I believe this is don, diacritics might be another issue