public class TokenStreamToTermAutomatonQuery
extends java.lang.Object
TermAutomatonQuery
where the transition labels are tokens from the TermToBytesRefAttribute
.
This code is very new and likely has exciting bugs!
Modifier and Type | Field and Description |
---|---|
private boolean |
preservePositionIncrements |
Constructor and Description |
---|
TokenStreamToTermAutomatonQuery()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
setPreservePositionIncrements(boolean enablePositionIncrements)
Whether to generate holes in the automaton for missing positions,
true by default. |
TermAutomatonQuery |
toQuery(java.lang.String field,
TokenStream in)
Pulls the graph (including
PositionLengthAttribute ) from the provided TokenStream , and creates the corresponding
automaton where arcs are bytes (or Unicode code points
if unicodeArcs = true) from each term. |
public TokenStreamToTermAutomatonQuery()
public void setPreservePositionIncrements(boolean enablePositionIncrements)
true
by default.public TermAutomatonQuery toQuery(java.lang.String field, TokenStream in) throws java.io.IOException
PositionLengthAttribute
) from the provided TokenStream
, and creates the corresponding
automaton where arcs are bytes (or Unicode code points
if unicodeArcs = true) from each term.java.io.IOException