SOLR-7084: FreeTextSuggester Nullpointer when building dictionary

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1659197 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jan Høydahl 2015-02-12 10:18:33 +00:00
parent ef3a99b385
commit c5d28062b5
2 changed files with 6 additions and 0 deletions

View File

@ -470,6 +470,9 @@ public class FreeTextSuggester extends Lookup implements Accountable {
if (contexts != null) {
throw new IllegalArgumentException("this suggester doesn't support contexts");
}
if (fst == null) {
throw new IllegalStateException("Lookup not supported at this time");
}
try (TokenStream ts = queryAnalyzer.tokenStream("", key.toString())) {
TermToBytesRefAttribute termBytesAtt = ts.addAttribute(TermToBytesRefAttribute.class);

View File

@ -131,6 +131,9 @@ Bug Fixes
* SOLR-6214: Snapshots numberToKeep param only keeps n-1 backups.
(Mathias H., Ramana, Varun Thacker via shalin)
* SOLR-7084: FreeTextSuggester: Better error message when doing a lookup
during dictionary build. Used to be nullpointer (janhoy)
Optimizations
----------------------
* SOLR-7049: Move work done by the LIST Collections API call to the Collections