[COMPASS-7090] Parse regex ejson to valid query Created: 07/Aug/23  Updated: 17/Aug/23  Resolved: 17/Aug/23

Status: Closed
Project: Compass
Component/s: GAI, Query Bar
Affects Version/s: None
Fix Version/s: No version

Type: Task Priority: Major - P3
Reporter: Rhys Howell Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on COMPASS-7100 Update the ai prompt to return MQL st... Closed
Duplicate
duplicates COMPASS-7008 `$regex` shows as `pattern` in Querie... Open
Epic Link: COMPASS-6866
Story Points: 3
Documentation Changes: Not Needed

 Description   

Currently when the ai response contains a $regex it does not parse the ejson into a valid query.
{"title":{"$options":"i","$regex":"test"}}
Becomes
{"title":{"options":"i","pattern":"test"}}

This is also likely what causes query history items with regex not to work properly (there's a ticket for that https://jira.mongodb.org/browse/COMPASS-7008)



 Comments   
Comment by Rhys Howell [ 17/Aug/23 ]

Not fixing in this epic as we're now using mql from COMPASS-7100

Generated at Wed Feb 07 22:45:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.