O'Reilly logo

Apache Solr Beginner's Guide by Alfredo Serafini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – playing with spellchecks

A very simple way to play with spellchecking is to define a new request handler to manage this kind of result apart from the common ones. On a real application, you should consider concatenating them directly after the main results, as usual using the appropriate component chain.

  1. We can start by defining a new paintings_spellchecker core, derived from the previous core, and add to its solrconfig.xml file the configuration for a multiple spellchecker using the following code:
    <searchComponent name="spellcheck" class="solr.SpellCheckComponent"> <str name="queryAnalyzerFieldType">text_auto</str> <lst name="spellchecker"> <str name="name">direct</str> <str name="field">artist_entity</str> <str name="classname">solr.DirectSolrSpellChecker</str> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required