How to pass get the number of hits in middleware onStageChange
?
#6636
-
Hi everyone! How can I get the number of hits in the middleware What I try to do: I am using InstantSearch v7. I use middleware to hook into the filter state update process by using
Is it possible to get |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
When you do the filter event, do you want the number of hits after the filter is completed? |
Beta Was this translation helpful? Give feedback.
hmm I was wrong and there's no result event indeed, sorry. You can listen on
instantSearchInstance.render
which will have the results available insearch.mainIndex.getResults
. Sorry for the detour you need to get this functionality but our builtin events don't need the result to send the event.