How do I use wildcard?
Wildcard searches lead to a larger recall (more products), and a reduced match strategy. The engine will stem words by using the defined language and dictionary, but sometimes you may want to use fuzzy matching to enable partial match on entered keywords.
Some common uses cases for this are:
- applying wildcard to part number searches
- applying wildcard if you want to increase your recall and are OK with reduced match strategy
- recognizing that your customers used a wildcard character, and flagging wildcard
There are 2 steps to triggering wildcard searches:
- Enable Wildcard via Query or Area settings. Please note, that this will soften the match strategy right away and not respect the defined match strategy (1 term must match only).
- Use Wildcard characters within the query to use fuzzy match if you’d like to do partial match on non-stemmed words.
Wildcard characters are ?
to fuzzy match to a single character, and *
to fuzzy match to zero or more characters.
For example:
sta*
will matchstar
andstart
ca?
will matchcat
andcar
.
Query
You can enable wildcard search at query time. This can be useful if you want to apply wildcard because you recognize certain patterns in your customers’ queries.
JSON Reference:
{ "wildcardSearchEnabled" : true }
Area
At area level you can enable wildcard for all queries that go through that area. The above screenshot shows the portion of the Area settings where you flag this on or off.
Once you flag the wildcard search as enabled, you can use wildcard symbols at query time to enable fuzzy match.
Wildcard fuzzy match characters
Wildcard characters are ?
to fuzzy match to a single character, and *
to fuzzy match to zero or more characters.
Character | Will match | Sample |
---|---|---|
* |
0 and more characters | sta* will match sta , star , start and standard |
? |
0 or 1 characters. If multiple ? exist in the query, only one ? will be used. |
sta? will match sta , star . Won’t match: start and standard |