THIS IS ARCHIVED DOCUMENTATION

Coveo for Sitecore Query Performance Leading Practices

Various elements have an impact on the query performance. Some factors are directly linked to the user query while others are linked to how the infrastructure is built and how queries are processed through this infrastructure.

REST Endpoint Pipelines

The REST endpoint pipeline allows you to customize the queries sent by Coveo for Sitecore and the search results returned by the Coveo index (see Understanding the REST Endpoint Pipelines). Keep in mind that any additional processing increases the overall query time.

Search Interface

Each search interface sends its own search query. You should avoid having more than one search interface on a single page to avoid sending many queries per user interaction. Instead, you should show all results on a unique search interface and allow your users to filter the content. The two best controls to filter content are:

  • Tabs
  • Facets

For more information on inserting tabs and facets in a search page, see Coveo for Sitecore Hive UI Framework.

JavaScript Files

Resources you add are loaded every time you access the page. It can slow down the rendering of a search page (or any page that contains search components).

  • Use minified resources.
  • If you implement a standalone search box, use the Coveo Search Box Resources component instead of the Coveo Search Resources (see Coveo Component Searchbox) to minimize the file sizes.

Query Scope

The scope of a query corresponds to the subset of the index that’s concerned by this query. The larger the scope is, the higher the load on the index is and the longer it takes to return results. Additionally, some complex query filters are longer to execute than simple ones.

  • Avoid using query filters to remove irrelevant items from the search results. Rather remove these items from the index if they should never be returned in the search results (see Excluding Sitecore Items From Your Coveo Index).
  • Don’t expand your queries using wildcards. Processing wildcard is extremely heavy on the index and has absolutely no advantage over machine learning and context-based relevance boosting (see Get Started With Coveo Machine Learning and User Context Component Properties).
  • Avoid using wildcard, REGEX, phonetic, or fuzzy match filter expressions if you don’t really need them. They’re heavy on the index.