Gravatar for

Question by aga, Mar 2, 2016 12:31 PM

Add OR clause to advance expression


We're using Coveo for indexing products. One scenario that we need to support is that a user should be able to pull up a product by the sku even when a user incorrectly places a dash or a space (skus contain spaces or dashes sometimes). So to tackle this I have a computed field that strips off any spaces or dash. On the client side, I was thinking of writing js that strips off the space and dashes from the search box and do an OR match on that specific field. So if a user searches for abc-1234, i would also search for abc1234 on the sanitized field. I want to do an OR in case if the user was searching for something that wasn't a sku.

So my question is, how do i append an OR to the search without the user seeing that on the search box? I'm guessing i should add this to the advance expression but I'm not sure how. Can I have any pointers?


0 Reply
Ask a question