Developer forum

Forum » CMS - Standard features » Logical operators in search

Logical operators in search

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I am trying to figure out if we can implement logical operators in search. I am talking about "+", quotes,  "&" AND, OR etc.

Every search engine has a specific way of handling these rules but I have never played around with them in our search logic.

Thank you,
Adrian


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Adrian

Technically they are there - but the input fromt he frontend goes through the queryparser and if you have e.g. an analyzed field, the search term will also get analyzed which will remove the specical characters. So as it is now, you cannot use these in e.g. querystring ?q=bike and use ?q=bik* - because our use of Lucene will take over.

You can do some in e.g. sorting: SortBy=-NameForSort or SortBy=NameForSort which will reverse the result.

If you really want to play with it, you can query the lucene index your self - bypassing the queries in DW.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you. I will check with the customer and see if we need to go that far.

Probably we can add some AI search instead.

Thank you,
Adrian

 

You must be logged in to post in the forum