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

MongoDB Atlas UI aggregate exception using $searchMeta

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • None
    • None
    • None
    • 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" }

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

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: