-
Type: Task
-
Resolution: Won't Do
-
Priority: Minor - P4
-
Affects Version/s: None
-
Labels:None
-
0.5
It was recently pointed out to me that the BSON spec requires that regular expression options be stored in alphabetical order. From bsonspec.org:
Regular expression - The first cstring is the regex pattern, the second is the regex options string. Options are identified by characters, which must be stored in alphabetical order...
Apparently the server takes the order of the options into account when sorting stored regular expressions (don't ask me why you would store regular expressions or need to sort them).
Document this in the bson section of the manual:
https://docs.mongodb.com/v3.2/reference/bson-types/
Options order doesn't appear to matter when using a regex in query criteria, so the $regex docs probably don't need any changes.
- is related to
-
CDRIVER-1883 libbson should ensure regex options are sorted
- Closed
-
DRIVERS-331 BSON Regex flags must be alphabetically ordered
- Closed