Developer forum

Forum » CMS - Standard features » Spell Check query considerations

Spell Check query considerations

Vincent Gercke Pedersen
Reply

I'm in the process of implementing the (newish) Spell Check functionality for the search functionality on a site and I've noticed that the spell chech results doesn't take the index .query contraints into consideration. This results in the user being suggested search terms with no results since some products are inactive or inaccesible due to other contraints.

How would you suggest I go abount solving this? Is it possible to make the Spell Check functionality take the query contraints into consideration?


Replies

 
Vladimir Shushunov Dynamicweb Employee
Vladimir Shushunov
Reply

Hi Vincent,
There is no such built in functionality.
Our spell checker uses Lucene.Net.Contrib.SpellChecker.dll which works with full index.
So probably the solution is only filter spell check results by additional custom code.
e.g for ecom it could be done in Notifications.Ecommerce.Querying.BeforeQueryDatabase notification.
BeforeQueryDatabaseArgs has needed properties: Query, .Settings {querySetting}, .Result {ISpellCheckerResult}, .AutoIds 

Best regards,
Vladimir

 

You must be logged in to post in the forum