Coveo for Sitecore Query Performance Best 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.
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:
For more information on inserting tabs and facets in a search page, see Coveo for Sitecore Hive UI Framework.
The scope of a query corresponds to the subset of the index that is 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 Filtering Your Content).
- Do not 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 Getting Started with Coveo Machine Learning and Leveraging User Context).
- Avoid using wildcard, REGEX, phonetic, or fuzzy match filter expressions if you don’t really need them. They are heavy on the index.