lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "Suggester" by AndrzejBialecki
Date Mon, 27 Sep 2010 20:31:32 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "Suggester" page has been changed by AndrzejBialecki.
http://wiki.apache.org/solr/Suggester

--------------------------------------------------

New page:
= Suggester - a trie-based "autocomplete" component. =

A common need in search applications is suggesting query terms or phrases based on incomplete
user input. These completions may come from a dictionary that is based upon the main index
or upon any other arbitrary dictionary. It's often useful to be able to provide only top-N
suggestions, either ranked alphabetically or according to their usefulness for an average
user (e.g. popularity, or the number of returned results).

Solr 3.x and 4.x include a component called Suggester that provides this functionality. See
[[https://issues.apache.org/jira/browse/SOLR-1316|SOLR-1316]] JIRA issue for the original
motivations and patches.

Suggester reuses much of the SpellCheckComponent infrastructure, so it also reuses many common
SpellCheck parameters, such as `spellcheck=true` or `spellcheck.build=true`, etc. The way
this component is configured in `solrconfig.xml` is also very similar:
{{{
  <searchComponent class="solr.SpellCheckComponent" name="suggest">
    <lst name="spellchecker">
      <str name="name">suggest</str>
      <str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
      <str name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookup</str>
      <str name="field">suggest</str>
      <str name="buildOnCommit">true</str>
<!--
      <str name="sourceLocation">american-english</str>
-->
    </lst>
  </searchComponent>
  <requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/suggest">
    <lst name="defaults">
      <str name="spellcheck">true</str>
      <str name="spellcheck.dictionary">suggest</str>
      <str name="spellcheck.collate">true</str>
    </lst>
    <arr name="components">
      <str>suggest</str>
    </arr>
  </requestHandler>
}}}

Mime
View raw message