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 classDeprecated.DFSA state withcharlabels on transitions. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.private BytesRefBuilderDeprecated.Used for input order checking (only through assertions right now)private final DaciukMihovAutomatonBuilder.StateDeprecated.Root automaton state.Deprecated.A "registry" for state interning. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDeprecated.The default constructor is private. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidDeprecated.static AutomatonDeprecated.Please seeAutomata.makeStringUnion(Iterable)instead(package private) static AutomatonDeprecated.Build a minimal, deterministic automaton from a sorted list ofBytesRefrepresenting strings in UTF-8.(package private) static Automatonbuild(BytesRefIterator input, boolean asBinary) Deprecated.Build a minimal, deterministic automaton from a sorted list ofBytesRefrepresenting strings in UTF-8.private AutomatonDeprecated.Called after adding all terms.private static intconvert(Automaton.Builder a, DaciukMihovAutomatonBuilder.State s, IdentityHashMap<DaciukMihovAutomatonBuilder.State, Integer> visited) Deprecated.Internal recursive traversal for conversion.private voidDeprecated.Replace last child ofstatewith an already registered state or stateRegistry the last child state.private booleansetPrevious(BytesRef current) Deprecated.Copycurrentinto 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.Copycurrentinto 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 standardAutomatoninstance. -
build
Deprecated.Please seeAutomata.makeStringUnion(Iterable)insteadBuild a minimal, deterministic automaton from a sorted list ofBytesRefrepresenting strings in UTF-8. These strings must be binary-sorted. -
build
Deprecated.Build a minimal, deterministic automaton from a sorted list ofBytesRefrepresenting strings in UTF-8. These strings must be binary-sorted. -
build
Deprecated.Build a minimal, deterministic automaton from a sorted list ofBytesRefrepresenting strings in UTF-8. These strings must be binary-sorted. Creates anAutomatonwith either UTF-8 codepoints as transition labels or binary (compiled) transition labels based onasBinary.- Throws:
IOException
-
add
Deprecated. -
replaceOrRegister
Deprecated.Replace last child ofstatewith an already registered state or stateRegistry the last child state.
-
Automata.makeStringUnion(Iterable)