I'm using the Suggester component for autocomplete. I have a variety of
types of suggestions that I would like to offer, such as locations, company
names, products, and dictionary words.

These lists vary in size and volatility, so keeping them all in the same
text file is not the most convenient.

I'm using text files because I want the ability to add weights to the terms
suggested.

Is it possible to use multiple text files? I tried the following:

<!-- WFSTLookup suggest component --> <searchComponent class=
"solr.SpellCheckComponent" name="suggestword"> <lst name="spellchecker"> <
str name="name">suggestword</str> <str name="classname">
org.apache.solr.spelling.suggest.Suggester</str> <str name="lookupImpl">
org.apache.solr.spelling.suggest.fst.WFSTLookupFactory</str> <str name=
"storeDir">suggestword</str> <str name="buildOnCommit">false</str> <!--
Suggester properties --> <bool name="exactMatchFirst">true</bool> <str name=
"sourceLocation">../data/words.txt</str> <str name="sourceLocation">
../data/cities.txt</str> </lst>

But the second list, the cities, are apparently undetected, after
restarting the tomcat and rebuilding the dictionary. Can this be done? If
not, how would you recommend managing different dictionaries?

Thanks,

Eric Wilson

Reply via email to