mirror of
https://github.com/apache/lucene.git
synced 2025-02-11 20:45:27 +00:00
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:
parent
1ec302d68e
commit
9fccf241f6
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user