On Fri, Jan 9, 2009 at 12:59 AM, Qingdi <qin...@nextbio.com> wrote: > > Hi, > > I use solr 1.3 and I have two questions about spellcheck. > > 1) if my index docs are like: > <doc> > <str name="NAME">university1</str> > <str name="TYPE">UNIVERSITY</str> > </doc> > <doc> > <str name="NAME">street1, city1</str> > <str name="TYPE">LOCATION</str> > </doc> > is it possible to build the spell check dictionary using field "NAME" but > with filter "TYPE"="UNIVERSITY"? > That is, I only want to include the university name in the dictionary. What > is the proper way to implement this? >
It is not possible out of the box. However, there are a couple of ways to do this. 1. You can create a copy field for 'NAME' (say 'NAME_SPELL') which has a value only if "TYPE"="UNIVERSITY" for the document. 2. You can create your own implementation of the IndexBasedSpellChecker and HighFrequencyDictionary which applies a filter query on "TYPE" and then uses the terms to create the dictionary. Option #1 would be probably be the easiest if you care only about "TYPE"="UNIVERSITY". > 2) my current data index size is about 11G, and the spelling dictionary > index size is about 6 G. After adding the spell check component, will the > spell checking have any impact on the runtime query performance and memory > usage? Should I increase the memory allocation for the solr server? > I think the spelling index will have some impact. But the magnitude of the impact and the memory needed depends on a number of factors such as type of queries, query rate etc. > > Thanks for your help. > > Qingdi > -- > View this message in context: > http://www.nabble.com/2-questions-about-solr-spellcheck-tp21359183p21359183.html > Sent from the Solr - User mailing list archive at Nabble.com. > > -- Regards, Shalin Shekhar Mangar.