Troubleshooting Querying Issues

This topic covers the most common querying issues that are not due to performance issues. Use the following guidelines to troubleshoot your issue before you contact Coveo Support for assistance.

Expected Search Result Not Returned

A search not returning the expected results is a very common querying issue. The typical causes of such an issue are insufficient effective permissions when content is secured and an improper query formulation.

Effective Permissions

When your index includes secured content, an item might not appear in the search results because the querying user is not allowed to access it (see Coveo Cloud V2 Management of Security Identities and Item Permissions). Use the Coveo Cloud administration console to review effective item permissions and check whether access to the desired item is allowed or denied for the querying user (see Permissions Tab).

Users to which access to an item is both allowed and denied do not see this item in their search results, since a Denied permission prevails over an Allowed permission.

John Smith is a member of both the Occupational Health and Safety Committee group and the R&D group, and wishes to access the 2017-05-12 Meeting Agenda item. In the 2017-05-12 Meeting Agenda item permissions, the Occupational Health and Safety Committee group is allowed to access the desired item, but the R&D group is denied access. For this reason, John Smith cannot access 2017-05-12 Meeting Agenda.

Query Formulation

Expected results might not be returned because the end-user inadvertently included unusual filters, incorrect expressions, or a NOT operator in your query (see NOT). Hidden filters can be associated with the search hub or tab to narrow search results.

You can use your browser developer tools to inspect the query sent by your search interface (see Inspecting a Query). Contact Coveo Support for assistance in analyzing this issue.

Facets Not Showing Properly

If you search for a given field and an expected facet value is not returned while other values are, your search page injection depth may be too low (see Injection Depth).

By default, the injection depth, or the number of top search results that are scanned to find possible facet values, is 1000. When building your search page facets, you can increase the value up to 231, but keep in mind that it will have an increasing impact on performance, as the injection depth goes up. To determine the right injection depth for your search, contact Coveo Support.

Sort Order Not Applied

You can customize your search page code to add a link allowing users to sort results by a non-standard field (see Coveo Component Sort).

When sorting results by a custom field, it may seem that the sorting order you chose does not apply. This can happen because you are searching for child items in a parent/child relationship, and the parents and children do not necessarily have the same value in the sorting field. The search results are sorted using the sorting field value for the child item, but in the search results, parent items are shown first, with the corresponding child items indented underneath, sorted as desired. However, if you look at the parent sorting order, the results may appear unsorted.

You are searching for PDF items attached to emails. You go in the My Emails tab of your search interface (see JavaScript Search Interface Editor), enter your query followed by filetype:pdf, and then click Date to sort the results by date in descending order.

The search results are displayed as follow:

  • Email dated 2017-05-04
    • PDF dated 2017-05-04
  • Email dated 2016-10-08
    • PDF dated 2015-12-11

    • PDF dated 2015-02-06

  • Email dated 2017-02-10
    • PDF dated 2014-10-09

While issues do not seem to be sorted by date, PDF attachments are indeed sorted by date in descending order.

Validate how a custom sorting behaves in search interfaces where child results are folded under parent results. Consider removing a counter-intuitively behaving sorting to prevent confusing end-users.

Did You Mean Feature

The Did You Mean feature suggests a modified query when the original query contains spelling mistakes and does not return enough results (see Misspelled Words).

The Did You Mean algorithm compares the queried term and the most occurring similar term in the index, and then computes the edit distance units (or typographical errors) between them (see Edit distance. For the algorithm to suggest a term, this term has to have a number of occurrences in the index that is an order of magnitude higher than the queried term for each unit of distance between them.

  • If you type distnace, for distance to be suggested, it has to have a number of occurrences roughly 10 (101) times higher, because distnace is one unit of edit distance away from distance.

  • If you type ditsanec, distance has to appear 100 (102) times more often than ditsanec in order to be returned as a suggestion because ditsanec is two units of edit distance away from distance.

If a term yields less occurrences than the required number, the Did You Mean algorithm does not suggest it. This can happen when the correct term is more common than that containing a typographical error, but is not included in items that the other queried items match.

You type idtsanec instead of distance, and then no search results are returned because there are no occurrences of idtsanec in your index. There are three typographical errors in the queried string, so distance has to appear at least 1000 (103) times in the index for the algorithm to suggest it. However, it has only 648 occurrences, so the search interface does not make any suggestion either.

  • The Did You Mean feature does not take the query context into account, i.e., that a word considered incorrect may appear frequently near the other queried words. The feature may therefore suggest a corrected query that returns fewer results.

  • Machine Learning also makes suggestions, along with content recommendations based on the query (see Coveo Machine Learning).

Special Characters and Patterns

Special characters are non-alphanumeric characters such as punctuation marks, quotation marks, currency symbols, and mathematical operators.

Coveo Cloud does not index special characters, and if queried, these characters are ignored, i.e., considered as a whitespace character. Thus, querying for a term containing a special character may not return the expected result.

  • Query jsmith@mycompany.com will be interpreted as jsmith mycompany com and will return items that match these keywords.
  • When searching for phone number (418) 263-1111, whether you put the area code in parentheses or not is irrelevant. Since the parentheses and the dash are ignored when queried, all items matching these three series of numbers will be returned, regardless of the phone number format.
  • When searching for iPhone 6+, items including iPhone 6 and iPhone 6+ will be returned.

You can, however, use search special characters within the Coveo Cloud query syntax (see Coveo Cloud Query Syntax Reference). Specifically, leveraging facet fields and advanced query operators allows you to perform very powerful searches (see Advanced Field Queries). Since advanced field operators use facet values only, they can access all characters in the facet value, thus making it possible to use patterns to search for anything.

JavaScript Search page developers can enable or disable wildcard match (enableWildcards option) independently from the Coveo Cloud query syntax (see Enabling Wildcard Match).