[SERVER-65203] MongoDB Atlas UI aggregate exception using $searchMeta Created: 03/Apr/22  Updated: 06/Dec/22  Resolved: 05/Apr/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Tim Barkley Assignee: Backlog - Triage Team
Resolution: Done Votes: 0
Labels: Atlas
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-04-02 at 9.26.41 PM.png     PNG File Screen Shot 2022-04-02 at 9.27.36 PM.png     PNG File Screen Shot 2022-04-02 at 9.28.19 PM-1.png    
Assigned Teams:
Server Triage
Operating System: ALL
Steps To Reproduce:
  1. Go to facet tutorial https://www.mongodb.com/docs/atlas/atlas-search/tutorial/facet-tutorial/
  2. Follow the tutorial to exit the existing default search index for sample_mflix
  3. Use the Atlas UI Aggregation Pipeline builder "new pipeline from text" and paste the aggregate as described in step 3 under Search the Collection  https://www.mongodb.com/docs/atlas/atlas-search/tutorial/facet-tutorial/#run-an-facet-query-that-groups-the-genre-and-year-fields-into-buckets

Result:

The following is shown in the web console;

{
"errorCode": "OPERATION_ERROR",
"message": "Reason: [01:14:05.242] Error interpreting pipeline string '[{\"$searchMeta\": {\"facet\": {\"operator\": {\"near\": {\"path\": \"released\", \"origin\":

{\"$date\": -1520035200000}

, \"pivot\": {\"$numberLong\": \"7776000000\"}}}, \"facets\": {\"genresFacet\":

{\"type\": \"string\", \"path\": \"genres\"}

, \"yearFacet\": {\"type\": \"number\", \"path\": \"year\", \"boundaries\": [1910, 1920, 1930, 1940]}}}}},{\"$limit\": 20},{ \"$limit\" : 20 }]' as list : error decoding key 0: invalid JSON input; expected {",
"params": [
"[01:14:05.242] Error interpreting pipeline string '[{\"$searchMeta\": {\"facet\": {\"operator\": {\"near\": {\"path\": \"released\", \"origin\":

{\"$date\": -1520035200000}

, \"pivot\": {\"$numberLong\": \"7776000000\"}}}, \"facets\": {\"genresFacet\":

{\"type\": \"string\", \"path\": \"genres\"}

, \"yearFacet\": {\"type\": \"number\", \"path\": \"year\", \"boundaries\": [1910, 1920, 1930, 1940]}}}}},{\"$limit\": 20},{ \"$limit\" : 20 }]' as list : error decoding key 0: invalid JSON input; expected

{" ], "version": "1", "status": "ERROR" }
Participants:

 Description   

I didn't see an option for Atlas for the Project. While following the facet tutorial and using the $searchMeta stage in the Atlas aggregate builder, the following exception is given in the web console; The same aggregate works using the Node driver so I'm assuming this is an exception happening during data transfer from the UI.

{
"errorCode": "OPERATION_ERROR",
"message": "Reason: [01:14:05.242] Error interpreting pipeline string '[{\"$searchMeta\": {\"facet\": {\"operator\": {\"near\": {\"path\": \"released\", \"origin\":

{\"$date\": -1520035200000}

, \"pivot\": {\"$numberLong\": \"7776000000\"}}}, \"facets\": {\"genresFacet\":

{\"type\": \"string\", \"path\": \"genres\"}

, \"yearFacet\": {\"type\": \"number\", \"path\": \"year\", \"boundaries\": [1910, 1920, 1930, 1940]}}}}},{\"$limit\": 20},{ \"$limit\" : 20 }]' as list : error decoding key 0: invalid JSON input; expected {",
"params": [
"[01:14:05.242] Error interpreting pipeline string '[{\"$searchMeta\": {\"facet\": {\"operator\": {\"near\": {\"path\": \"released\", \"origin\":

{\"$date\": -1520035200000}

, \"pivot\": {\"$numberLong\": \"7776000000\"}}}, \"facets\": {\"genresFacet\":

{\"type\": \"string\", \"path\": \"genres\"}

, \"yearFacet\": {\"type\": \"number\", \"path\": \"year\", \"boundaries\": [1910, 1920, 1930, 1940]}}}}},{\"$limit\": 20},{ \"$limit\" : 20 }]' as list : error decoding key 0: invalid JSON input; expected

{" ], "version": "1", "status": "ERROR" }

 



 Comments   
Comment by Tim Barkley [ 06/Apr/22 ]

Thank you Eric. Will do.

Comment by Eric Sedor [ 06/Apr/22 ]

Yes tbarkley29@gmail.com, please do. In this JIRA project, we're only able to address bugs with the MongoDB database itself.

Thank you!

Comment by Tim Barkley [ 05/Apr/22 ]

Ok, it's not necessarily an issue that just "I'm" having per se (I don't think I'm doing anything wrong). I think it's an issue with Atlas UI and data transformation i.e., I think it's possibly an issue in the Atlas Web App. Either that or the documentation isn't updated and the example can't be executed in the pipeline as it's written. Would I still submit this via Intercom? Thanks

Comment by Eric Sedor [ 05/Apr/22 ]

Hi tbarkley29@gmail.com,

The SERVER project is for bugs and feature suggestions for the MongoDB server. To inform our Atlas team of issues you are having, please reach out to the Atlas support team via Intercom. You can do this by clicking the round green button at the bottom right of the cluster view page in Atlas.

Thank you,
Eric

Generated at Thu Feb 08 06:02:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.