lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: highlight the search word
Date Sun, 15 Aug 2004 18:26:32 GMT
Hi Pasha,
I think the advice you gave is for an earlier version.
With the latest version things have moved around and you would have to: 
    //use a max fragment size > size of text to ensure you get all text in one fragment
    highlighter.setTextFragmenter(new SimpleFragmenter(400000));
    // call getBestFragment....
   String result =highlighter.getBestFragment(tokenStream,text);


public String getBestFragment(TokenStream tokenStream, String text)

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

View raw message