I am trying to override the numberOfResults
property in Coveo Search UI before initializing, but doesn't seem to take affect. What could I be doing wrong?
Coveo.$('#@Model.Id').on("buildingQuery", function(e, args) {
if(overrideNumberOfResults){
args.queryBuilder.numberOfResults= 40;
console.log(args.queryBuilder); //shows correct value of 40
}
}).coveoForSitecore("init", CoveoForSitecore.componentsOptions);
Incorrect value when sent to service call. Shows 20 instead of 40.