Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-65203

MongoDB Atlas UI aggregate exception using $searchMeta

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Triage
    • ALL
    • Hide
      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" }
      Show
      Go to facet tutorial https://www.mongodb.com/docs/atlas/atlas-search/tutorial/facet-tutorial/ Follow the tutorial to exit the existing default search index for sample_mflix 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" }

      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" }

       

        1. Screen Shot 2022-04-02 at 9.26.41 PM.png
          298 kB
          _tbarkley29@gmail.com
        2. Screen Shot 2022-04-02 at 9.27.36 PM.png
          175 kB
          _tbarkley29@gmail.com
        3. Screen Shot 2022-04-02 at 9.28.19 PM-1.png
          384 kB
          _tbarkley29@gmail.com

            Assignee:
            backlog-server-triage [HELP ONLY] Backlog - Triage Team
            Reporter:
            tbarkley29@gmail.com Tim Barkley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: