lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markharw...@yahoo.co.uk
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);

Cheers
Mark.


public String getBestFragment(TokenStream tokenStream, String text)


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message