-
Notifications
You must be signed in to change notification settings - Fork 22
Description
According to the docs:
To only show
articleswhere thetitleattribute is a case-insensitive match againstlinux-rocks:http://localhost:16006/rest/articles?filter[title]=~linux-rocks
To only show
articleswhere thetitleattribute 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
| ":": new RegExp(value) |
I will provide a PR below.