$search/$vectorSearch explain on a non-existent collection uasserts

XMLWordPrintableJSON

    • Query Integration
    • ALL
    • Hide
      db.nonExistentColl.explain().aggregate({$search: {index: "search-index", text: {query: "fire", path: ["element"]}}})
      db.realColl.explain().aggregate({$unionWith: {coll: nonExistentColl, pipeline: [{$search: {index: "search-index", text: {query: "fire", path: ["element"]}}}]}})

      I'm omitting the $vectorSearch examples to not put an embedding.

       

      Show
      db.nonExistentColl.explain().aggregate({$search: {index: "search-index" , text: {query: "fire" , path: [ "element" ]}}}) db.realColl.explain().aggregate({$unionWith: {coll: nonExistentColl, pipeline: [{$search: {index: "search-index" , text: {query: "fire" , path: [ "element" ]}}}]}}) I'm omitting the $vectorSearch examples to not put an embedding.  
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      It seems that explain() is trying to get the mongot's explain output, which fails because the namespace does not exist, triggering the following assertion:

      A uuid is required for a search query, but was missing. Got namespace test.nonexistent

      We should at least fail more gracefully and with a more descriptive message.

      This happens inside $unionWith as well, but not inside $lookup. This happens on all verbosities.

            Assignee:
            Unassigned
            Reporter:
            Mariano Shaar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: