Package org.apache.lucene.util.automaton
Class DaciukMihovAutomatonBuilder
- java.lang.Object
-
- org.apache.lucene.util.automaton.DaciukMihovAutomatonBuilder
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_TERM_LENGTH
This builder rejects terms that are more than 1k chars long since it then uses recursion based on the length of the string, which might cause stack overflows.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(CharsRef current)
Add another character sequence to this automaton.static Automaton
build(Collection<BytesRef> input)
Build a minimal, deterministic automaton from a sorted list ofBytesRef
representing strings in UTF-8.org.apache.lucene.util.automaton.DaciukMihovAutomatonBuilder.State
complete()
Finalize the automaton and return the root state.
-
-
-
Field Detail
-
MAX_TERM_LENGTH
public static final int MAX_TERM_LENGTH
This builder rejects terms that are more than 1k chars long since it then uses recursion based on the length of the string, which might cause stack overflows.- See Also:
- Constant Field Values
-
-
Method Detail
-
add
public void add(CharsRef current)
Add another character sequence to this automaton. The sequence must be lexicographically larger or equal compared to any previous sequences added to this automaton (the input must be sorted).
-
complete
public org.apache.lucene.util.automaton.DaciukMihovAutomatonBuilder.State complete()
Finalize the automaton and return the root state. No more strings can be added to the builder after this call.- Returns:
- Root automaton state.
-
build
public static Automaton build(Collection<BytesRef> input)
Build a minimal, deterministic automaton from a sorted list ofBytesRef
representing strings in UTF-8. These strings must be binary-sorted.
-
-