Hi Johan, To avoid selecting fragments see here: http://www.mail-archive.com/java-user@lucene.apache.org/msg01097.html
Be aware though that the highlighter is really designed to decorate plain-text by adding highlight tags - if your text already includes any HTML mark-up it becomes hard to correctly add highlighter mark-up into the text in a way which guarantees a legal document. To work reliably the highlighter would need to understand the structure of the existing tags eg to understand that the "height" attribute in an image tag should not be marked up if the user searched for "height". You may also have to concern yourself with handling badly marked-up content (ie most web pages) where tags are not always closed. This level of functionality is beyond the scope of the highlighter. If you want to preserve existing mark-up someone made reference to a custom solution for handling this here: http://www.mail-archive.com/java-user@lucene.apache.org/msg01108.html Cheers, Mark ___________________________________________________________ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]