Right now I am using:
basicDBObject.append("attribute", Pattern.compile(".*(" +
keywordsPattern + ").*")); // this is case-sensitive
I want "keywordsPattern" to be case insensitive
I know how it is done in mongo shell( using /i ), but dont know how to
translate the same in mongo java driver queries
I have not used the Java driver, but creating the Pattern with case
insensitive flag should work (at least it does in c# driver)
Pattern.compile("REGEX", Pattern.CASE_INSENSITIVE);
--
Ekin Koc