Gravatar for

Question by yonico, May 6, 2015 2:03 PM

How to get totalCount of results in CoveoSearch.ascx

Hi - I wanted to ask you how can I get the number results of the query success in CoveoSearch.ascx by jquery. thanks!

1 Reply
Gravatar for

Answer by Luc Bergeron, May 6, 2015 2:27 PM

When handling the querySuccess event, you will find it in the event arguments.

Coveo.$('#search').on('querySuccess', function(e, args) {
    alert('Total number of results is: ' + args.results.totalCount);

You can find additional documentation here:

I hope this helps.

Ask a question