You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does the existing filtering infrastructure support full-text searches? I'd be pretty surprised if Eve doesn't already support searching for partial text within a field or within multiple fields. Can somebody help me out?
The text was updated successfully, but these errors were encountered:
I was getting OperationFailure: database error: invalid operator: $search errors when trying to use the $text query operator. Looks like I needed MongoDB >= 2.4. (My development server automatically had 2.6, so I thought my production server would too.) Anyway, this will hopefully fix it. I'll report back soon!
Assuming this works, we should add some helpful text in the Eve docs.
So first off, I needed to remove '$regex' from MONGO_DBNAME_BLACKLIST setting. The where parameter of my http query ended up looking like this:
{'name': {'$regex': search,'$options': 'i'}}
For what it is worth, I was using AngularJS to make the http query. Since Angular strips attributes that starts with $, I also had to pre-stringify the that object using JSON.stringify() befor handing it to Angular. (The Angular team is planning a fix for this in 1.3. See Angular issue #1463.
Does the existing filtering infrastructure support full-text searches? I'd be pretty surprised if Eve doesn't already support searching for partial text within a field or within multiple fields. Can somebody help me out?
The text was updated successfully, but these errors were encountered: