Developer forum

Forum » CMS - Standard features » Underscore character not compatible with 'Contains' operator in user smart search

Underscore character not compatible with 'Contains' operator in user smart search

Melissa Borgmann
Melissa Borgmann
Reply

Hello,

If an underscore character is utilized in a user smart search expression value and the operator is 'Contains', results are not returned (Figure 1-2). Is this expected behavior? If so, can documentation (https://doc.dynamicweb.com/documentation-9/users/user-management/smart-searches) be updated to reflect character limitations for reference? 

Solution running 9.17.5 + Swift 1.26.0.

Figure 1

 

Figure 2

 

Thank you,

Melissa B.


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Melissa,

 

This is likely because the "Chain" field is Analyzed. You should be able to create a new index field that is Non-Analyzed (assuming it's not a comma split value) and then it would work accurately. At that point, you can do an Equals operator instead of a Contains.

 

Best Regards,

Nuno Aguiar

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply
This post has been marked as an answer

Hi,

I was able to reproduce the issue on my test environment as well. It looks like a bug per preliminary research, so I've created new task #21079 against the issue to follow up the research to fix the logic or update the manual if limitation. Thanks for finding.

Nuno, thanks for replying, but smart search is not based on repository index at all, so your suggestion can be used in repository query only.

BR, Oleg QA 

Votes for this answer: 1
 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Oleg,

 

I totally missed that. Then I do agree it's very likely a bug :)

 

You must be logged in to post in the forum