Developer forum

Forum » Ecommerce - Standard features » Search filter matching on part of word possible?

Search filter matching on part of word possible?

Remi Muller
Reply
By default the ecom search filter has some logic which product match the search criteria.
Example:
Product: Whitefish
When you search on "white" or "fish" this product is not found.

Can the search filter be configured to also include results which match part of the word?

Replies

 
Remi Muller
Reply
 Excuse me for bumping. FYI topics with 0 replies dropped to the bottom.
 
Pavel Volgarev
Reply
This post has been marked as an answer
Hi Remi,

The logic is the following: if any products with the word "white" can be found, no search is performed for products that has word starting with "white" (e.g. "Whitefish"). Regarding searches like "ends with" (e.g. "fish" in "Whitefish": this is unfortunately not possible (see Apache Lucene - Query Parser Syntax),  

We actually have a number of requests for improving this functionality (adding an ability to "tell" the filter to always perform a wildcard search). I will try to find a work item and rise up its priority (or create one if it doesn't exist). 

This functionality will be available in the next service release (mid. February).

P.S. Typing "white*" should give you products that have words starting with "white".

-- Pavel
Votes for this answer: 0
 
Remi Muller
Reply
Looking forward to the next service release. I am aware of the white*, thanks. We can not catch the *fish (yet) :)

FYI, you probably already know but i did find this:

http://lucene.apache.org/java/3_0_1/api/core/org/apache/lucene/queryParser/QueryParser.html#setAllowLeadingWildcard(boolean)

It should be possible to allow leading wildcards but it is not recommended for performance. If you could make it configurable that would be best. 
 
Pavel Volgarev
Reply
Hi Remi,

Thanks for the link - actually I read about this functionality before but completely forgot that it was possible :-)

-- Pavel

 

You must be logged in to post in the forum