Troubleshoot Querying Issues
Troubleshoot Querying Issues
This article covers the most common querying issues that aren’t caused by performance issues. Use the following guidelines to troubleshoot your issue before you contact Coveo Support for help.
Query Syntax Is Disabled
For classic hosted search pages, you can also enable the Coveo query syntax using the Interface Editor. To do so, access the Searchbox Options, and then click the Advanced Options button. You can then check the Enable query syntax box, and then click Apply.
When the Coveo query syntax is disabled:
The exact phrase match (keywords between quotes) still works (see Searching for a Phrase).
All non-alphanumeric characters in a query except for the underscore (
_), apostrophe (
'), asterisk (
*), question mark (
?), and space characters are converted into dots (
.) and are therefore considered as contiguity characters. These characters indicate that the group of words must be searched together as a single expression.
You search for
canada+shopping+mall. After the non-alphanumeric character conversion, your query becomes
canada.shopping.mall, which is equivalent to
"canada shopping mall"(see Searching for a Phrase). So, only items containing the phrase
canada shopping mallare returned in your search results. Conversely, if you search for
canada shopping mall(with regular space characters between the keywords), your search results consist of items in which
Expected Search Result Not Returned
A search that doesn’t return the expected query results is a very common issue. The typical causes are insufficient effective permissions when content is secured, and an improper query formulation.
When your index includes content from a source that indexes permissions, an item might not appear in the search results because the querying user isn’t allowed to access it. Use the Coveo 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 don’t see this item in their search results, since a
Denied permission prevails over an
For example, John Smith is a member of both the
Occupational Health and Safety Committee group and the
R&D group, and wants 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 can’t access
2017-05-12 Meeting Agenda.
A query may also return unexpected search results because the end user inadvertently included unusual filters, incorrect query expressions or syntax, or a
NOT operator. Hidden filters can be associated with the search hub or tab to narrow search results.
You can revise the syntax used in your query by referring to the examples listed in query syntax. Correcting the syntax can help build more relevant search results.
Facets Not Showing Properly
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 as the injection depth goes up, it will have an increasing impact on performance. 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 doesn’t apply. This can happen because you’re searching for child items in a parent/child relationship, and the parents and children don’t 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’re searching for PDF items attached to emails. You go in the My Emails tab of your search interface (see Use the 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 follows:
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 don’t 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 doesn’t return enough results.
The Did You Mean algorithm compares the queried term and the most occurring similar terms in the index, and then computes the edit distance units (or typographical errors) between them. For the algorithm to suggest a term, this term must occur significantly more in the index than the queried term for each unit of distance between them. The number of results that a query yields has no impact on the algorithm.
distnace is one unit of edit distance from
ditsnace is two. Therefore, the algorithm requires fewer occurrences of
distance in your index to suggest it when you query
distnace than when you query
If an alternative term yields fewer occurrences than the required number, the Did You Mean algorithm doesn’t suggest it. This can happen when the correct term is more common than the misspelled term, but isn’t included in items that the other queried items match.
The Did You Mean feature doesn’t take the query context into account, i.e., a word considered incorrect may appear frequently near the other queried words. The feature may therefore suggest a corrected query that returns fewer results.
Coveo Machine Learning also makes suggestions, along with content recommendations based on the query.
Special Characters and Patterns
Special characters are non-alphanumeric characters such as punctuation marks, quotation marks, currency symbols, and mathematical operators.
Coveo doesn’t index special characters, and if queried, these characters are ignored, i.e., considered as a whitespace character. Therefore, querying for a term containing a special character may not return the expected result.
email@example.com be interpreted as
jsmith mycompany comand 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+will be returned.
However, some special characters can be used to formulate advanced query syntax expressions). Specifically, you can perform very powerful searches by leveraging facet fields and advanced query operators (see Advanced Field Queries). Since advanced field operators only use facet values, they can access all characters in the facet value, therefore making it possible to use patterns to search for anything.
enableWildcards option) independently from the Coveo query syntax (see Enabling Wildcard Match).