Package org.apache.lucene.search
Class TokenStreamToTermAutomatonQuery
- java.lang.Object
- 
- org.apache.lucene.search.TokenStreamToTermAutomatonQuery
 
- 
 public class TokenStreamToTermAutomatonQuery extends Object Consumes a TokenStream and creates anTermAutomatonQuerywhere the transition labels are tokens from theTermToBytesRefAttribute.This code is very new and likely has exciting bugs! - WARNING: This API is experimental and might change in incompatible ways in the next release.
 
- 
- 
Constructor SummaryConstructors Constructor Description TokenStreamToTermAutomatonQuery()Sole constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetPreservePositionIncrements(boolean enablePositionIncrements)Whether to generate holes in the automaton for missing positions,trueby default.TermAutomatonQuerytoQuery(String field, TokenStream in)Pulls the graph (includingPositionLengthAttribute) from the providedTokenStream, and creates the corresponding automaton where arcs are bytes (or Unicode code points if unicodeArcs = true) from each term.
 
- 
- 
- 
Method Detail- 
setPreservePositionIncrementspublic void setPreservePositionIncrements(boolean enablePositionIncrements) Whether to generate holes in the automaton for missing positions,trueby default.
 - 
toQuerypublic TermAutomatonQuery toQuery(String field, TokenStream in) throws IOException Pulls the graph (includingPositionLengthAttribute) from the providedTokenStream, and creates the corresponding automaton where arcs are bytes (or Unicode code points if unicodeArcs = true) from each term.- Throws:
- IOException
 
 
- 
 
-