Taking advantage of the Partial match feature

By default, a Coveo index only returns items that match all of the keywords present in a basic query expression (q). This behavior reduces the number of results. However, it may also prevent the index from returning relevant items that don’t contain keywords entered by the user.

The Partial match feature allows the index to return items containing only a subset of the keywords entered by the user.[1] This ensures that relevant items containing only some of the query keywords are returned. Enabling partial match also reduces the chance of queries returning no results.

Tip
Leading practice

Enable partial match on your default query pipeline to ensure that all user queries benefit from this feature.

Setting partial match parameters

The Partial match feature combines the following query parameters which are set as a query parameter rule in a query pipeline:footnote:settingpartialmatchfootnote1[It’s also possible, although not typically recommended, to enable partial match through the search interface. See the enablePartialMatch option of the Querybox component.:

  • partialMatch

  • partialMatchKeywords

  • partialMatchThreshold

    1. On the Query Pipelines (platform-ca | platform-eu | platform-au) page, click the query pipeline in which you want to add a rule, and then click Edit components in the Action bar.

    2. On the page that opens, select the Advanced tab.

    3. In the Advanced tab, on the left side of the page, select Query parameters.

    4. In the upper-right corner of the page, click Add rule to access the Add a Query Parameter Rule subpage.

    5. Under Parameters, select Partial match, then click Next.

    6. On the Rule configuration panel, do the following:

  • Select whether to enable or disable the partial match.

    Coveo | Partial match
  • Under In a query, enter the minimum number of keywords that a query must contain to activate the partial match.

  • Under In a result, click Percentage or Absolute number, and enter the applicable value for the minimum number of keywords that must be present in an item to match the query expression.

  • Under Condition, you can optionally select a query pipeline condition in the dropdown menu or create a new one.

  • Under Description, you can optionally enter information to help manage the rule in the future, such as the creation date and the reason for its creation.

  • Click Add rule. The new rule appears at the bottom of the list of the query parameter rules.

How partial match values affect search results

The following table illustrates how the default partial match values affect search results.

Number of keywords in query Minimum number of keywords an item must contain to match

4

The basic query expression (q) is too small, so partial match doesn’t apply.

5

3

6

3

7

4

However, as queries often contain just a few keywords, the default values may be too restrictive. In some scenarios, you might prefer to set lower values for partial match parameters, such as 3 for partialMatchKeywords and 35% for partialMatchThreshold. These values are more permissive than the defaults, allowing for more partial matches and providing a more generous set of results.

The following table illustrates how these alternative values affect search results.

Number of keywords in query Minimum number of keywords an item must contain to match

2

The basic query expression (q) is too small, so partial match doesn’t apply.

3

2

4

2

5

2

6

3

7

3

If you set the partial match parameter even lower, the search interface will return more results. However, setting the parameters too low can produce a result set that users may perceive as too broad or irrelevant.

Leading Practice

When tuning the partial match parameter values, you should always test how each value affects the search results.

For example, you can set up an A/B Test and validate whether your new partial match settings are improving the Search Event Clickthrough.

Example use case

A user is searching for information about their Speedbit product using the following query:

Example

how do I change weather app settings from Fahrenheit to Celsius

How partialMatchKeywords affects the results

The above query contains 11 keywords. If partialMatchKeywords is set to either the default (5) or alternative (3) value, partial match applies because the length of the query exceeds both values.

As long as partialMatchKeywords has a value of 11 or less, partial match will apply to this query.

How partialMatchThreshold affects the results

The default partialMatchThreshold value will return results containing at least 6 matching keywords (that is, 50% of 11 query keywords, rounded up). However, this will exclude relevant items with 4 or 5 matching keywords that might answer the user’s query (for example, Setting the Weather App to Celsius).

The alternative partialMatchThreshold value will return results containing at least 4 matching keywords (that is, 35% of 11 query keywords, rounded up).

If you set partialMatchThreshold to 15%, you’ll receive partial matches with only 2 matching keywords. This may return results that aren’t relevant to the user’s query (for example, Installing the Weather App).

Limitations

When enabled, the Partial match feature doesn’t support exact match phrases (that is, queries that are enclosed within double quotation marks ("")). This means that if a query contains a quoted phrase, or if a thesaurus rule expands a query to include quoted phrases, the Partial match feature considers each term within the phrase separately.

Example

You set the Partial match feature as follows in your query pipeline:

A user sends the following query in the search box: HDMI compatible "4K gaming monitor"

Even though the query contains a phrase enclosed within double quotes, it could return results that contain only one of the following terms:

  • 4K

  • gaming

  • monitor


1. The more an item contains keywords from a user query, the higher it will rank in the search results compared to items containing fewer keywords or none.