Open Reggino opened 11 years ago
Hrmm, we don't support that syntax, but we do support regexes, just do {field: /acme.*corp/i}
and you'll be good. If someone can mention this in our "differences from mongodb docs" that would be great.
The only thing is, the former syntax is much easier to serialize for e.g. AJAX requests... Consider a JavaScript browser-application, trying to query on the server, passing that query using AJAX. I think the standardized syntax offers an advantage here.
Any plans to support $regex ?
Awesome project, thanks!
When writing a query using the syntax as mentioned here: http://docs.mongodb.org/manual/reference/operator/regex/
query-engine throws an error. To be more specific: the query:
{ field: { $regex: 'acme.*corp', $options: 'i' } }
results in:
Error: Couldn't find the selector $regexp