Gravatar for

Question by debubiswas, Feb 24, 2015 1:39 AM

How to avoid duplicate results when using coveo for sitecore

When performing search for a keyword I sometimes get back duplicate results, or repeating results back from sitecore. Please advise on how I can avoid this. On earlier coveo search interface, we used to use that checkbox setting to avoid such duplicates.

1 Reply
Gravatar for

Answer by Martin Laporte, Feb 24, 2015 3:16 AM

Are the items duplicated in the original content (e.g. Sitecore), or only in the index? In any cases it's always best to prune duplicates there, but the JS UI does provide an option to activate the index duplicate filtering feature. It requires a little bit of JS though, something like:

$('#search').on('buildingQuery', function(e, args) { args.queryBuilder.enableDuplicateFiltering = true; });

Replace #search with the proper selector.

Gravatar for

Comment by debubiswas, Feb 24, 2015 8:13 AM

Thanks mlaporte. Appreciate your help. The items just showed up duplicate on results. They were fine on Sitecore. I was able to use your specified event handler and take care of this issue. Thanks again.

Ask a question