public class TokenStreamToTermAutomatonQuery extends Object
TermAutomatonQuery
where the transition labels are tokens from the TermToBytesRefAttribute
.
This code is very new and likely has exciting bugs!
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(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(String field, TokenStream in) throws 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.IOException
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.