On Aug 22, 2008, at 12:32 PM, Chris Hostetter wrote:


: I'd like to have a handler that 1) executes a query, 2) provides spelling : suggestions for incorrectly spelled words, and 3) if the original query : returns 0 results, return results based on the spell check suggestions.
:
: 1 & 2 are straight forward using the SpellCheckComponent, but I can't figure : out 3 without writing custom code. Can I do it with just configuration
: settings?

i don't think so ... you'd need to write a new RequestHandler (or maybe a
SearchComponent ... could subclass QueryComponent?) to do this.

My initial though is to put the built-in spell checking component *before* the "query" component, and provide a custom QueryComponent (named "query") that does the initial search and if no results found does a search based on spell suggestions.

But, the simplest solution is for the client to manage this and issue a second request using the suggestions if no results are found. However, I know sometimes in practice that there is push-back on having a client with too much smarts.

        Erik

Reply via email to