Description
According to the docs:
To only show
articles
where thetitle
attribute is a case-insensitive match againstlinux-rocks
:http://localhost:16006/rest/articles?filter[title]=~linux-rocks
To only show
articles
where thetitle
attribute containsfor
:
It doesn't state that seaching within a field (:
) should be case-sensitive.
Looking at for example the jsonapi-store-relationaldb handler, you can see that the :
filter is actually case insensitive.
Searching with the mongodb handler should also be case-insensitive, because the behavior of filters should be identical between storage providers.
A workaround is to query all possible cases and merge the search results:
?filter[title]=:for
?filter[title]=:For
?filter[title]=:FOR
The offending line is this:
jsonapi-store-mongodb/lib/mongoHandler.js
Line 70 in eaf0c47
I will provide a PR below.