Stats invalid when performing aggregate query and normal query lazily #14146
nickchampion
started this conversation in
General
Replies: 1 comment 1 reply
-
Hi Can you send a unit-test or a sample project that reproduce the issue? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
HI,
I am trying to do a faceted search, I am building up a query, calling lazily, applying the aggregations and then execute the aggregations query lazily as follows, this is using the Node.js client.
Code as follows
Now there are 3 documents returned by this query, I am applying 7 facets, the totalResults field on statistics however is showing 7 so it looks like its pulling back the stats for the facet query rather than the initial document query.
If I don't use the Lazily API I can get the correct result count before issuing the second query, but when I do this lazily the stats always reflects the aggregation query stats not the document query stats.
Is there some way to extract the stats from the first lazy query?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions