I think the best way to tokening/stem is to use the analyzer directly. for
example:
TokenStream ts = analyzer.tokenStream(field, new StringReader(text));
Token token = null;
while ((token = ts.next()) != null) {
Term newTerm = new Term(field, token.termTe
Hi,
I'm trying to build a SpanQuery using word stems. Is parsing each term
with a QueryParser, constructed with an Analyzer giving stemmed
tokenStream, the right approach? It just seems to me that QueryParser is
designed to parse queries, and so my hunch is that there might be a
better way.