Module org.apache.lucene.core
Package org.apache.lucene.util.automaton
Class DaciukMihovAutomatonBuilder
java.lang.Object
org.apache.lucene.util.automaton.DaciukMihovAutomatonBuilder
Deprecated.
Builds a minimal, deterministic
Automaton
that accepts a set of strings. The algorithm
requires sorted input data, but is very fast (nearly linear with the input size).- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
Deprecated.DFSA state withchar
labels on transitions. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Deprecated.private BytesRefBuilder
Deprecated.Used for input order checking (only through assertions right now)private final DaciukMihovAutomatonBuilder.State
Deprecated.Root automaton state.Deprecated.A "registry" for state interning. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Deprecated.The default constructor is private. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Deprecated.static Automaton
Deprecated.Please seeAutomata.makeStringUnion(Iterable)
instead(package private) static Automaton
Deprecated.Build a minimal, deterministic automaton from a sorted list ofBytesRef
representing strings in UTF-8.(package private) static Automaton
build
(BytesRefIterator input, boolean asBinary) Deprecated.Build a minimal, deterministic automaton from a sorted list ofBytesRef
representing strings in UTF-8.private Automaton
Deprecated.Called after adding all terms.private static int
convert
(Automaton.Builder a, DaciukMihovAutomatonBuilder.State s, IdentityHashMap<DaciukMihovAutomatonBuilder.State, Integer> visited) Deprecated.Internal recursive traversal for conversion.private void
Deprecated.Replace last child ofstate
with an already registered state or stateRegistry the last child state.private boolean
setPrevious
(BytesRef current) Deprecated.Copycurrent
into an internal buffer.
-
Field Details
-
MAX_TERM_LENGTH
Deprecated.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:
-
stateRegistry
Deprecated.A "registry" for state interning. -
root
Deprecated.Root automaton state. -
previous
Deprecated.Used for input order checking (only through assertions right now)
-
-
Constructor Details
-
DaciukMihovAutomatonBuilder
private DaciukMihovAutomatonBuilder()Deprecated.The default constructor is private. Use static methods directly.
-
-
Method Details
-
setPrevious
Deprecated.Copycurrent
into an internal buffer. -
convert
private static int convert(Automaton.Builder a, DaciukMihovAutomatonBuilder.State s, IdentityHashMap<DaciukMihovAutomatonBuilder.State, Integer> visited) Deprecated.Internal recursive traversal for conversion. -
completeAndConvert
Deprecated.Called after adding all terms. Performs final minimization and converts to a standardAutomaton
instance. -
build
Deprecated.Please seeAutomata.makeStringUnion(Iterable)
insteadBuild a minimal, deterministic automaton from a sorted list ofBytesRef
representing strings in UTF-8. These strings must be binary-sorted. -
build
Deprecated.Build a minimal, deterministic automaton from a sorted list ofBytesRef
representing strings in UTF-8. These strings must be binary-sorted. -
build
Deprecated.Build a minimal, deterministic automaton from a sorted list ofBytesRef
representing strings in UTF-8. These strings must be binary-sorted. Creates anAutomaton
with either UTF-8 codepoints as transition labels or binary (compiled) transition labels based onasBinary
.- Throws:
IOException
-
add
Deprecated. -
replaceOrRegister
Deprecated.Replace last child ofstate
with an already registered state or stateRegistry the last child state.
-
Automata.makeStringUnion(Iterable)