lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J Jensen" <>
Subject Highlighter for 1.4.3?
Date Mon, 31 Oct 2005 06:07:38 GMT

I got the, extracted the highlighter-dev.jar and added it to the my classpath.
 I tried to Test the jar with this code from the LIA...

String string = "The quick brown fox jumps over the lazy dog";
TermQuery termQuery = new TermQuery(new Term("field", "fox"));
QueryScorer scorer = new QueryScorer(termQuery);
Highlighter highlighter = new Highlighter(scorer);
TokenStream tStream = new StandardAnalyzer().tokenStream("field", new StringReader(string));
String s = highlighter.getBestFragment(tStream, string);

and I get this error...  

Exception in thread "main" java.lang.NoSuchMethodError:<init>(II)V


Am I using the correct jar?  After looking into the src files, I want to say that the TextFragment
constructor (from the jar file) take only 2 params, but the Highlighter or TokenSources is
trying to pass it 3 params, but I am not sure of any of this?  Can you make sense of this?

Thanks again, 

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

View raw message