Developer forum

Forum » PIM » Search for special chars in a shared query

Search for special chars in a shared query

Michael Knudsen
Reply

In a shared query, where I want to find all products that contains a / in the productnumber, how do I achieve that?

This is my attempt:

Br. Michael Knudsen


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

When the field is analyzed, any non-words and stop-words are removed - that includes /. I.e. the "My product / and variants" when indexed as an analyzed field will become 'my', 'product', 'variants' in the index - so you cannot search for '/' and 'and'.

So to search for those, you need to search in a product number field that is not analyzed. Your index might not have that field, but then you can create it. Refer to the indexing docs.

Votes for this answer: 1
 
Michael Knudsen
Reply

Thanks Nicolai, I'll create a ProductNumberForSearch based on ProductNumber, but not analyzed.

Br. Michael Knudsen

 

You must be logged in to post in the forum