We should be able to use AnalyzingInfixSuggester in Solr by defining it in solrconfig.xml
Does this new AnalyzingInfixSuggester play well with NRT indexing?
It doesn't right now, but that should be simple to fix since it's just a Lucene index under the hood... patches welcome!
A quick question:
Does this new AnalyzingInfixSuggester play well with NRT indexing? i.e does it pick up changes done via soft commit?
Thanks Varun and Areek!
Commit 1523454 from Robert Muir in branch 'dev/branches/branch_4x'
[ https://svn.apache.org/r1523454 ]
SOLR-5167: Ability to use AnalyzingInfixSuggester in Solr
Commit 1523451 from Robert Muir in branch 'dev/trunk'
[ https://svn.apache.org/r1523451 ]
To answer Varun's question, the storeDir parameter for the AnalyzingInfixSuggestions should be null, the reason being that this analyzer does not store the dictionary at the suggestor level, rather manages building and loading the index that gets created on its own. hence the store() and load() should return false (this is what gets used by the Suggester to load any persistent dictionary).
Proper way to use AnalzingInfixSuggester in Solr + tests for the new LookupFactory
I have a few doubts over this impl.
1. AnalyzingInfixSuggester.store() and AnalyzingInfixSuggester.load() return true instead of false. Not sure if this is the right?
2. Suggester.reload() throws a FileNotFoundException since no file actually gets written. Any suggestions on what the right approach for this would be.
We could define it like:
<searchComponent class="solr.SpellCheckComponent" name="suggest">
<str name="field">name</str> <!-- the indexed field to derive suggestions from -->