Sum the count of results from multiple instances


I am using instant search to search from multiple indices. Each result is appended to another container. I used this instruction to implement it:

I need to sum the count of results from all indices. How to deal with it?
My code looks like this:


Hi Dominik
If you mean your want the number of hits for every index, you can use the stats widget and customize the template. I’ve changed your fiddle to add it:

If you need to show nbHitsInMovies + nbHitsInProducts, I’m afraid that’s not possible without creating custom stats components. Unfortunately this is only possible with InstantSearch 2 or 3 (your jsfiddle is using InstantSearch 1)


Thank you! Now I am using InstantSearch v. 3, but I don’t know how to implement stats to sum count of results from movies & products. You’re showing only movies count.