Developer forum

Forum » Development » Intercept search terms before it goes into Lucene query (old index)

Intercept search terms before it goes into Lucene query (old index)

Kevin Steffer
Kevin Steffer
Reply

I have a problem when users search for "b-long" that the dash-character is replaced with whitespace ending up with this query

+sys_summary:*b* AND +sys_summary:*long*

The correct search query would be

+sys_summary:"b-long"

I have tried

Dynamicweb.Notifications.eCommerce.SearchFilters.BeforeComposeQuery
Dynamicweb.Notifications.eCommerce.SearchFilters.AfterComposeQuery
Dynamicweb.Notifications.eCommerce.SearchFilters.BeforeQueryingIndex
Dynamicweb.Notifications.eCommerce.SearchFilters.AfterQueryingIndex

But none of the notification subscribers let me modify the criterias used for building the query.

Any suggestions to do that?


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Nope, not on the old index. The problem is that the analyzer is used for the query term splitting the phrase into terms using word seperators.

In the new index you are able to control this much better.

BR Nicolai

Votes for this answer: 1
 
Kevin Steffer
Kevin Steffer
Reply

Thanks!

 

You must be logged in to post in the forum