Troubleshooting thesaurus and stop words rules
Troubleshooting thesaurus and stop words rules
The information provided on this page can help you identify and resolve issues with thesarus rules impacting partial match parameters. However, keep the following in mind:
-
A given set of behaviors, such as unexpected search results, can be caused by different underlying issues.
-
If one or more query pipeline rules aren’t behaving as you expect, you can find useful troubleshooting information in the execution report, that contains detailed information about the rules that were applied to a query.
Use the following guidelines to troubleshoot your issue before you contact Coveo Support for help.
Thesaurus entries impacting partial match parameters
-
thesaurus rules can affect the way partial match interacts with a query.
-
The
partialMatchKeyword
andpartialMatchThreshold
parameters determine the results from keywords found in the query. -
A thesaurus rule that alters the number of keywords in the basic query expression (
q
) can affect the partial match parameters.
Potential cause
Let’s say your query pipeline contains the following query parameter rules:
-
partialMatch
: true -
partialMatchKeywords
: 3 -
partialMatchThreshold
: 66%
![Create partial match rules | Coveo Platform](/en/assets/images/cloud-v2-administrators/o6jb0124-partial-match-rule.png)
This means that the partial match would activate if there are a minimum of three keywords in q and two-thirds of the words in the queries are keywords.
However, a Synonym thesaurus rule like include water, eau, agua, pond, lake… when any are present
can transform the q
to a version that doesn’t meet the 66% threshold, returning no results.
![Create thesaurus synonym rule](/en/assets/images/cloud-v2-administrators/o6jb0124-thesaurus-synonym-rule.png)
The Relevance Inspector (platform-ca | platform-eu | platform-au) shows the basicExpression
has been transformed as per the thesaurus rule, thus not respecting the partial match parameters anymore and giving no (zero) results.
![No result in Relevance Inspector with synonym rule|long queryexpression | Coveo Platform](/en/assets/images/cloud-v2-administrators/o6jb0124-relevance-inspector-no-result.png)
Resolution
In such a case, it’s better to change the thesaurus rule from Synonym to Replace. By using the same words in the thesaurus rule, it’s possible to change the interaction of these two rules by changing the type of rule from Synonym to Replace.
![Create thesaurus replace rule | Coveo Platform](/en/assets/images/cloud-v2-administrators/o6jb0124-thesaurus-replace-rule.png)
When the query agua fire earth
is searched this time, it will be transformed by the thesaurus rule into water fire earth
.
![Result set in Relevance Inspector with replace rule|short queryexpression | Coveo Platform](/en/assets/images/cloud-v2-administrators/o6jb0124-relevance-inspector-after-rule-change.png)
The basicExpression
will be the same even if the user enters any of the other words mentioned in the thesaurus rule.
Hence, the version of the query after the thesaurus rule will respect the partial match parameters.