Closed stefandesu closed 3 years ago
Not sure why I haven't discovered this before, but MongoDB's indexes are not lexical, i.e. if we have an index on a field and we sort using this field, it's going to use the number representation of the letters. This sorts uppercase letters before lowercase letters, for example.
One solution would be to use a Case Insensitive Index: https://docs.mongodb.com/manual/core/index-case-insensitive/
In any case, having proper behavior with this will require reindexing those fields after the version upgrade.
Sorting by date of creation and by date of modification should be enough to start with.
Sorting by date of creation and by date of modification should be enough to start with.
Well, we already have sorting by label and notation (and especially the former makes a lot of sense to me), but I only just noticed that it wouldn't work properly. I have an idea how to get around it without adding new indexes.
I added a bunch of changes to mitigate the issues:
_keywordsLabels
and _keywordsNotation
, thus fixes the above issues._keywordsLabels
is now sorted by language:
languages
arrayI also added a piece of upgrade code which can be executed via npm run upgrade
that regenerates those keywords for all schemes.
I'm going to look for other small things that could be included in a release, but then I'd release version 1.2.2.
There is no way to choose which order (ascending or descending) schemes should be sorted when using the
sort
parameter. We should add anorder
parameter like for/mappings
.118