Gravatar for

Question by aga, Aug 31, 2016 1:49 PM

Prefixed text matches


I'm running into an issue when Coveo tries to partial match text. When i search for 30007, Coveo matches text like "30007 is my address", as well as "30007-1234 is my address". But it doen't match 3000712. I'm guessing this is how it tokenizes the text. The field containing 3000712 is a faceted field and is text searchable.

Is there anything i can do for coveo to partial match on that text field?

FYI, this is coveo for sitecore 3.


1 Reply
Gravatar for

Answer by Daniel Lavoie, Aug 31, 2016 3:51 PM

Hi, To perform partial match, you need to use Wildcards. In the example above, you would query for 30007* to match 3000712. This type of Wildcard search can yield of very high number of possible matches, and will stop at the configured maximum, so keep that in mind, especially if searching for very general expressions like th*, etc.

If the field is a facet, and you search in it using the field name (not using its free text property), there is another way of doing it, using the advanced query operators, in this case *=. This makes it possible to search for anything inside the field, including characters that are not usually indexed.

For example:

@field *= "30007-1*"

The above example wouldn't work well on the whole content because wildcards as free text search is done on a word per word basis, so 1* would yield too many candidates and would not restrict to the values following 30007.

I know these explanations are not made in the specific context of Sitecore, so maybe a Sitecore / Coveo expert can join us and specify how to use *= with the Sitecore integration.

Gravatar for

Comment by François Lachance-Guillemette, Aug 31, 2016 4:32 PM

The Sitecore integration enables this feature with the Enable wildcards parameter, located under the "Query Behavior" section of the Search Page Parameters.

Ask a question