add comments about scary stuff going on

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1405365 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-11-03 15:43:24 +00:00
parent 1ec302d68e
commit 9fccf241f6

View File

@ -208,10 +208,14 @@ public final class FuzzySuggester extends AnalyzingSuggester {
}
if (subs.length == 0) {
// automaton is empty, there is no accepted paths through it
return BasicAutomata.makeEmpty(); // matches nothing
} else if (subs.length == 1) {
// no synonyms or anything: just a single path through the tokenstream
return subs[0];
} else {
// multiple paths: this is really scary! is it slow?
// maybe we should not do this and throw UOE?
Automaton a = BasicOperations.union(Arrays.asList(subs));
// TODO: we could call toLevenshteinAutomata() before det?
// this only happens if you have multiple paths anyway (e.g. synonyms)