Skip to content

Sorting on string is not lexicographical #3006

Answered by kocolosk
hamedminaee asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, this is almost certainly because the Standard analyzer is treating the ":" as punctuation and the resulting tokenized field doesn't sort the same way as the string would.

Echoing @willholley in another forum, you could try using the keyword analyzer for that field. You can use the _search_analyze endpoint (https://docs.couchdb.org/en/master/ddocs/search.html#testing-analyzer-tokenization) to test how different analyzers tokenize the value.

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@hamedminaee
Comment options

Comment options

You must be logged in to vote
2 replies
@hamedminaee
Comment options

@janl
Comment options

Comment options

You must be logged in to vote
1 reply
@hamedminaee
Comment options

Comment options

You must be logged in to vote
1 reply
@hamedminaee
Comment options

Answer selected by janl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #3006 on July 15, 2020 14:09.