[DOCS-9208] Document requirement that regular expression options must be stored in alphabetical order Created: 25/Oct/16  Updated: 30/Oct/23  Resolved: 17/Mar/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Minor - P4
Reporter: Bernie Hackett Assignee: Andrew Aldridge
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-1883 libbson should ensure regex options a... Closed
is related to DRIVERS-331 BSON Regex flags must be alphabetical... Closed
Participants:
Days since reply: 46 weeks, 6 days ago
Story Points: 0.5

 Description   

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.



 Comments   
Comment by Sarah Olson [ 17/Mar/23 ]

Closing this out on the grounds that:

  • Details of this request are significantly outdated. 
  • Our documentation has evolved substantially since this request was made. 

Based on this, closing as WON'T DO. Please don't hesitate to give me a shout or to reopen if you disagree.

Comment by Bernie Hackett [ 24/Feb/23 ]

I don't know. Better question for the query team, I think. pawel.terlecki@mongodb.com?

Comment by Emet Ozar [ 24/Feb/23 ]

bernie@mongodb.com Hi Bernie! We're taking a look into this ticket, and wondering is it still relevant? Thanks in advance for your response.

Generated at Thu Feb 08 07:57:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.