Is it possible to run a search query and get the matching documents and facets from $searchMeta in the same query?
I tried using both $search and searchMeta in the same aggregation pipeline, but that gives an error.
Using $search and $facet.meta = [{ $replaceWith: "$$SEARCH_META" }] only gives the total matching documents, but not facets, i.e. fields indexed with stringFacet.
With ElasticSearch, the matched documents, facets and meta information are returned in the same response. I.e.