Developer forum

Forum » Templates » Did you mean? - Limit to results that are valid based on query

Did you mean? - Limit to results that are valid based on query

Claus Kølbæk
Claus Kølbæk
Reply

Hey

We are using the QueryResult.SpellCheck in a query search, but it is given a long range of suggestions that have no results, as the results shown are being limited by the queries. Is there a way to change so the SpellCheck is made on the index after the query instead of before? - and if not, then I guess this is a feature request :)


Replies

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

Nope, I am affraid not.

It is a 'term suggestion' so it will return the nearest possible terms in the index - and not from the search result. A limitation of what we can do with Lucene.

When you have multiple languages this can be a real problem - that can be solved by having one index for each language. That can be setup relatively easy in Settings.

But with all kind of other suggestions, your cannot do anything different. The only solution would be to first get the term suggestions and then for each of them make a search by adding an expression to your full query using each term and search to see if it will return something, and then only include terms that yields results. But that would be slow...

BR Nicolai

Votes for this answer: 1

 

You must be logged in to post in the forum