Developer forum

Forum » Ecommerce - Standard features » Search for partial product numbers

Search for partial product numbers

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I have a setup with different types of product numbers, like:

2030556
EB20356KL
FB12345

We'd like to be able to offer partial match search so EB203, 20356KL would find the middle product and 20356 would find the first and second.

Can that be done? I enabled ContainsExtended on the query (understanding the performance issues) but I am not getting the results I am after.

Imar

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Maybe you are doing it wrong?

 

Remember that you have 2 places to change if you are in a Swift implemenation:

eq parameter is for typeahead, q is for the actual search

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Oops - wrong yellow marker. Should be on the "Productnumber_search" field!

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Oh, I was doing it wrong indeed. Or at least somewhat. It's an old Rapido site and I had set product number to ContainsExtended. But by setting Free text to ContainsExtended, it started to work:

 

Not sure why it didn't work on number only. Maybe because it's not analyzed?

Imar

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

It should not be related to if the field is analyzed or not - my example was not analyzed.

 

You must be logged in to post in the forum