When I had the exact problem, I could not request, ignoring the case. I ended up copying the value I wanted to find in order to normalize it. In this case, you can create a new property and convert it to lowercase and have an index.
EDIT:
DBObject ref = new BasicDBObject(); ref.put("myfield", Pattern.compile(".*myValue.*" , Pattern.CASE_INSENSITIVE)); DBCursor cur = coll.find(ref);
I wonder if this works?
Amir raminfar
source share