The error is a server one, not specific to the driver.
Have you first try the query in MongoShell. It's always recommended to design working queries.The error is a server one, not specific to the driver.
--
You received this message because you are subscribed to the Google Groups "ReactiveMongo - http://reactivemongo.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reactivemong...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reactivemongo/c6a65e40-405f-41f0-9d39-7b52a2e7f630%40googlegroups.com.
db.DB333.find({ $where: "/^2.*/i.test(this.age)" })
db.DB333.find({ $where: "/^2.*/i.test(this.age)" })
have you tested without removing ".r.pattern.pattern()" or changing your pattern?
On Fri, Oct 4, 2019 at 6:40 PM Raj Bala <r...@ficode.in> wrote:
--I am trying to use where operator in `reactiveMongo` to implement Full Text Search for Numeric and Text field using same API for both. But I am unable to get the correct syntax for doing it in `reactive mongo`.I have followed mongoDocument "https://www.tutorialspoint.com/mongodb-regex-search-on-integer-value" to search text and Integer using where operator.But unable to implement in reactiveMongo.code:- collection.find(BSONDocument("$where" -> BSONDocument("$regex" -> "/^columns.*/i.test(this.columns)".r.pattern.pattern()))).skip(offset).cursor[M]().collect[List](num,Cursor.FailOnError[List[M]]())where M is any case classBut i am getting exception:-> DatabaseException['$where got bad type' (code = 2)]
You received this message because you are subscribed to the Google Groups "ReactiveMongo - http://reactivemongo.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reacti...@googlegroups.com.