On Monday 16 February 2004 12:12, [EMAIL PROTECTED] wrote:
> deprecated:
>
> String description = doc.getField("contents").stringValue();
> final java.io.Reader r = new StringReader(description);
> final TokenStream in = analyzer.tokenStream(r);
> for (Token token; (token = in.next()) != null; )
> {
> System.out.println(token.termText());
> }
Can somebody explain tokenStream() to me?
This is not deprecated:
TokenStream in = new WhitespaceAnalyzer().tokenStream("contents", new
StringReader(doc.getField("contents").stringValue()));
But what is the first argument (field) for tokenStream() good for? Actually I
can type whatever I want...? Don't understand the short description in the
API docs...
Timo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]