Is it possible to create compound index in mongodb with only single field being case-insensitive? As documentation says, it's possible to set collation settings only on the whole index, not specific fields.
Asked
Active
Viewed 26 times
0
-
1MongoDB collections do not "really" have a "schema". This is the main reason why there are no presumptions of data types in any document properties and you cannot therefore name "specific fields" for any such purpose. The existing methods for "case insensitive searching" are already well documented. – Neil Lunn Nov 12 '18 at 02:28
-
1You're asking the same essential question and it has all the same answers. There is "no possible way" to create an index in the way you are asking for. The only "solutions" are the ones already provided in answers. A "duplicate" means same **solution** and not the "word for word same *question*". – Neil Lunn Nov 12 '18 at 02:32
-
I understand now, thank you, Neil – Georgy Farniev Nov 12 '18 at 04:46