Hi @Alex_Bjorlig thanks for your interest and glad to see you back in the forum. While I cannot say much just yet, we will be releasing something that I think your team will be able to use that leverages search indexes and facets in Lucene very soon. Stay tuned.
The $facet stage, and its sub-pipelines, cannot make use of indexes, even if its sub-pipelines use $match or if $facet is the first stage in the pipeline. The $facet stage will always perform a COLLSCAN during execution.
Thanks for awesome answers - and now it makes more sense we get a bunch of warnings about collection scans, because we use facets for every operation. We implement cursor based pagination, and in a facet operation we:
Lkp the actuel rows to return
The total count
The paginated count
Optional facet results.
Are there any feature requests or issues tracking the fact the facet sub-pipelines can’t use an index?