Option to enable case sensitive requests (performance) #238
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there,
The goal here was to deal with the old issue of strings search. Indeed, we are currently facing slow queries in our project — large Mongo collections used there — which are due because of the RegExp parsing. We actually want to perform searchs with the string with provide, which means case sensitive requests.
After digging into issues/PR of the project, I made this modification according to what you specified in PR #235 :
wlNext
config convention, following the work you started over waterline sequel (see balderdashy/waterline-sequel@62ec93e)I tested this branch against our project, and I didn't find any issue for now. Doing so I found out that you still need to perform the RegExp conversion when dealing with a modifier (e.g.
$not
) since Mongo doesn't allow a string but either a RegExp or a document (see http://docs.mongodb.org/manual/reference/operator/query/not/).Please let me know if something is wrong.
I personally have one test failing, but it also fails on
master
branch, which I don't understand for now. I may need to add some unit tests too. Just let me know ;-)Thanks.