Gravatar for

Question by yonico, May 29, 2015 9:24 AM

Cancel query

Hi - I need to cancel the query process after custom validation in coveo for sitecore.(CoveoSearch.ascx) by jquery. Can you please provide an example?

buildingQuery Triggered when a new query is being performed in order to build the QueryBuilder for the query. This event provides the following event data: Name Description queryBuilder The QueryBuilder object for the query being prepared. cancel If an handler sets this flag to true, the query will be cancelled.

1 Reply
Gravatar for

Answer by Martin Laporte, Jun 1, 2015 3:34 AM

cancel is a very recent addition and was not flagged as "for next release" in the doc, sorry. Once released it'll be usable like this:

function myHandler(e, args) { args.cancel = true; }

Ask a question