Gravatar for

Question by Diego, Mar 10, 2015 3:44 PM

wildcards not working as expected on coveo for sitecore

So I have a few items indexed with a specific term and I'm testing wildcards with coveo

On the admin tool if I search for my name "dieg*" I got 3 results which is correct

but when I try to run the same query within the search box on sitecore I get "No results for dieg* Query was automatically corrected to diego*"

which is not what I am expecting. does anyone know how to change that in order for it to actually show the results from the original query?

1 Reply
Gravatar for

Answer by Jean-François L'Heureux, Mar 10, 2015 4:13 PM

The JavaScript Search Framework used by Coveo for Sitecore is configured to disable wildcard search by default (see QueryBox Component). Unfortunately, the Coveo Search component in Coveo for Sitecore doesn't have a checkbox to easily configure this option.

To enable it on your component, you should:

  1. Duplicate the default Coveo Search component if not already done to avoid modifying the default component sublayout (see Duplicating the Coveo Search Component).
  2. In your new CustomCoveoSearch.ascx file, locate the <div class="CoveoSearchBox" element and add the data-enable-wildcards="true" attribute to it.
Ask a question