[ https://issues.apache.org/jira/browse/SOLR-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481759 ]
Otis Gospodnetic commented on SOLR-81: -------------------------------------- There is a useless (I think) static IndexReader in there: private static IndexReader reader = null; If we set this to some real IndexReader, we can get the SpellChecker to act as follows (from its coffeedocs): .... * @param ir the indexReader of the user index (can be null see field param) * @param field String the field of the user index: if field is not null, the suggested * words are restricted to the words present in this field. * @param morePopular boolean return only the suggest words that are more frequent than the searched word * (only if restricted mode = (indexReader!=null and field!=null) .... public String[] suggestSimilar(String word, int numSug, IndexReader ir, String field, boolean morePopular) throws IOException { So, should we do this on init: reader = req.getSearcher().getReader(); ? Or maybe add a new param to solrconfig.xml's declaration of the SpellCheckerRequestHandler that turns this on/off? Thoughts? > Add Query Spellchecker functionality > ------------------------------------ > > Key: SOLR-81 > URL: https://issues.apache.org/jira/browse/SOLR-81 > Project: Solr > Issue Type: New Feature > Components: search > Reporter: Otis Gospodnetic > Priority: Minor > Attachments: SOLR-81-edgengram-ngram.patch, > SOLR-81-ngram-schema.patch, SOLR-81-ngram.patch, SOLR-81-ngram.patch, > SOLR-81-ngram.patch, SOLR-81-ngram.patch, SOLR-81-spellchecker.patch, > SOLR-81-spellchecker.patch, SOLR-81-spellchecker.patch > > > Use the simple approach of n-gramming outside of Solr and indexing n-gram > documents. For example: > <doc> > <field name="word">lettuce</field> > <field name="start3">let</field> > <field name="gram3">let ett ttu tuc uce</field> > <field name="end3">uce</field> > <field name="start4">lett</field> > <field name="gram4">lett ettu ttuc tuce</field> > <field name="end4">tuce</field> > </doc> > See: > http://www.mail-archive.com/solr-user@lucene.apache.org/msg01254.html > Java clients: SOLR-20 (add delete commit optimize), SOLR-30 (search) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.