lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <>
Subject Highlighter API
Date Fri, 18 Feb 2005 22:20:43 GMT

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 	
  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.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message