We have both Solr and Coveo Indexes for different purposes.

We apply an optimization technique to indexing that I call Escape Validation. It's designed to prevent indexation from indexing content redundantly. We apply this technique across many controller actions and service methods.

For instance, an Article is getting shown in couple of pages and should get indexed once as a detail page; but be prevented from being re-indexed in another page. Here is the code that we currently use to teach Coveo Indexation to escape that use case:

HttpContext.Current.Request.UserAgent.Contains("Coveo Sitecore Search Provider"))
    return null;

Similarly, how can I teach Solr the same way as Coveo?

1 Answer 1


We can do it with Solr as well, to do we have a list of configuration changes in schema.xml and solrconfig.xml only.

The best part with Solr, we do not have to write code logic. It can be enabled or disabled using configuration. Even if you want to get overwritten existing item after the match - you can do or avoid it. Here I am sharing with you Solr official documentation to implement this. https://solr.apache.org/guide/7_4/de-duplication.html

Hope this will help you.

  • Hello @Pradeep, Thanks for responding and apologies for very long delay in replying. Is there any way to do this programmatically rather than configuring?
    – Yeshwanth
    Nov 11, 2022 at 10:24
  • Do anyone have ideas to programmatically achieve this?
    – Yeshwanth
    Nov 14, 2022 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.