public class TokenSources extends Object
Constructor and Description |
---|
TokenSources() |
Modifier and Type | Method and Description |
---|---|
static TokenStream |
getAnyTokenStream(IndexReader reader,
int docId,
String field,
Analyzer analyzer)
A convenience method that tries a number of approaches to getting a token stream.
|
static TokenStream |
getTokenStream(IndexReader reader,
int docId,
String field) |
static TokenStream |
getTokenStream(IndexReader reader,
int docId,
String field,
Analyzer analyzer) |
static TokenStream |
getTokenStream(TermPositionVector tpv) |
static TokenStream |
getTokenStream(TermPositionVector tpv,
boolean tokenPositionsGuaranteedContiguous)
Low level api.
|
public static TokenStream getAnyTokenStream(IndexReader reader, int docId, String field, Analyzer analyzer) throws IOException
reader
- docId
- field
- analyzer
- IOException
public static TokenStream getTokenStream(TermPositionVector tpv)
public static TokenStream getTokenStream(TermPositionVector tpv, boolean tokenPositionsGuaranteedContiguous)
tpv
- tokenPositionsGuaranteedContiguous
- true if the token position numbers have no overlaps or gaps. If looking
to eek out the last drops of performance, set to true. If in doubt, set to false.public static TokenStream getTokenStream(IndexReader reader, int docId, String field) throws IOException
IOException
public static TokenStream getTokenStream(IndexReader reader, int docId, String field, Analyzer analyzer) throws IOException
IOException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.