Hi,
the Highlighter's getBestFragment method takes a TokenStream and a text.
Wouldn't it be easier to give it just the text and an analyzer so the user
doesn't have to care about building a TokenStream? Like this:
public final String getBestFragment(Analyzer analyzer, String text)
throws IOException
{
TokenStream tokenStream = analyzer.tokenStream("field", new
StringReader(text));
return getBestFragment(tokenStream, text);
}
The old method could then be deprecated. Or am I missing something? This
would also avoid problems in case the stream doesn't match the text.
Regards
Daniel
--
http://www.danielnaber.de
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]