I had #1 in mind. Everything in my mainIndex is supposed to be correctly spelled, so I just want to use that as a source for spelling suggestions. I'd check for suggestions on low numbers of results (no results, or very few for a one word query).

#2 would be even better but as you said, its a lot trickier. For my needs, just a spelling suggester would be perfect. Would it require java programming, or could I get away with it with the current Solr (adding n-gram fields and querying on them)?

Thanks,

Michael Imbeault
CHUL Research Center (CHUQ)
2705 boul. Laurier
Ste-Foy, QC, Canada, G1V 4G2
Tel: (418) 654-2705, Fax: (418) 654-2212



Chris Hostetter wrote:
: Has anybody successfully implemented a Lucene spellchecker within Solr?
: If so, could you give details on how one would achieve this?

There's really two ways to interpret that question ...
  1) built a spell correction suggestion application powered by Solr,
     where you manually feed it the data as documents and the mainIndex is
     the source of suggestion data.
  2) Embeded sepll correction suggestion in Solr, so that request handlers
     can return suggested alternatives allong with the results from your
     mainIndex.

#1 would probably be pretty easy as people have mentioned.

#2 would be a lot trickier...

request handlers can certainly keep state, and could even write to files
if they wanted to to preserve state accross JVM instances to maintain a
permenant dictionary store ... and i suppose you could use a newSearcher
Listener to know when documents have been added so you can scan them for
new words to update your dictionary ... but off the top of my head it
sounds like it would get pretty complicated.



-Hoss

Reply via email to