-
Nov 16th, 2012, 06:50 AM
#1
Regular expression | Mongodb help required
I must be doing something really stupid and need help to realize that
. I am using a simple regex like below to find out all matching documents where short name starts with passed name. Now somehow this does not work as i get out of memory because i suspect all documents are getting returned. I tried to put limit in query but that also has not worked .
results=mongoTemplate.find(Query.query(new Criteria("short_name").regex( "/^" + name +".*/i")), MongoInstrument.class);
Any insights?
Thanks
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules