Question

Is possible in Solr to provide an in-place auto-correction? Like Goggle:

enter image description here

If yes, then please tell me how?

Is it a Solr configuration? or some extra hand-coded logic after I get Solr's suggestions?

Because I'm already using Solr's suggester component and I'm not getting this in-place auto-correction.

Was it helpful?

Solution

Just use the solr spellCheck component. The suggest component reuses already a lot of stuff. So it should be quite easy to add corrected suggestions.

See http://wiki.apache.org/solr/Suggester and http://wiki.apache.org/solr/SpellCheckComponent#spellcheck.collateExtendedResults

You can use the collationQuery to ensure search results on click.

OTHER TIPS

I see 2 components to getting your desired result.

  1. (back end) enabling the spellCheck component(http://docs.lucidworks.com/display/solr/Spell+Checking)
  2. (front end) using some sort of jQuery/ajax (http://jqueryui.com/autocomplete/) call to the server and using the results to auto populate the drop down with the results from the server
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top