Re: Stemming terms in SpanQuery

2006-05-02 Thread Jason Calabrese
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

Stemming terms in SpanQuery

2006-05-01 Thread Michael Chan
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.