[COMPASS-7008] `$regex` shows as `pattern` in Queries>Recent Created: 06/Jul/23  Updated: 09/Jan/24

Status: Open
Project: Compass
Component/s: Query, Query Bar, Query History
Affects Version/s: 1.38.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Amir Paster Assignee: Unassigned
Resolution: Unresolved Votes: 2
Labels: top-of-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: macOS
node.js / npm versions:
Additional info:


Attachments: PNG File Screenshot 2023-07-06 at 18.41.45.png    
Issue Links:
Duplicate
is duplicated by COMPASS-7090 Parse regex ejson to valid query Closed
Related
is related to COMPASS-6470 Recent and favourited queries are not... Closed
Story Points: 3

 Description   

Problem Statement/Rationale

$regex item in query is kept as pattern in  query history. 'pattern' doesn't work.

The query needs to be kept without any change.

Steps to Reproduce

How could an engineer replicate the issue you’re reporting?

  1. I created a query in the `Filter` window. The query contained a $regex key. the query works as expected.
  2. I clicked on the clock icon and found the query in the 'Recents' list
  3. The query in the list does not contain '$regex'. Instead there is 'pattern' (with the specified value) and 'options' (with empty string).
  4. When clicking on this query, and applying it, no document is found.

Expected Results

There should be `$regex` in the recent query.

Actual Results

There is 'pattern' in the recent query, and this query doesn't retrieve any document.

Additional Notes

Any additional information that may be useful to include.



 Comments   
Comment by Nicolas de Cenival [ 09/Jan/24 ]

Hello 

Same issue on a Rocky Linux 8 with Compass V 1.41.0 using short notation : { hostname : /icms/ }

recorded in Query history (or Favorites) : {hostname: {pattern: 'icms',options: ''}}
and returns nothing.

I agree with dow@zurich.ibm.com, this bug is really annoying... 

Thanks 

N.

Comment by Joris Cadow [ 13/Nov/23 ]

I find this bug extremely annoying as I was relying on the recent and favourite queries to help me not having to memorize the syntax for occasional debugging. Better there was no query saved than a wrong one that doesn't work. 

Comment by PM Bot [ 06/Jul/23 ]

Hello amirp@senser.tech, thank you for reaching out to us! The team will review your issue and get back to you soon as soon as possible.

Please review your issue to ensure you've included your environment details and have attached relevant logs (with any sensitive data redacted), so that we're best able to provide you a timely and thorough response. Thanks again!

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