I wrote a very simple sax parser for our xml content - I check for the search tokens (analyzer.tokenStream) in the text and place a span tag around each found token. This process could work well with xhtml as well.
In other words, I could never get the highlighter to do what I wanted to do, but there's a lot to be learned from the highlighter source.
Fred Toth wrote:
Hi, We have a need to present HTML documents with all search terms highlighted. Everything I've seen regarding the Highlighter code seems to point to the typical case of extracting relevant fragments from the text for presentation of hit lists. Is it possible to use the core highlighting code to process an entire document? Instead of extracting fragments, we would want the entire document back. Has anyone done this? Or is this the wrong approach? Even if the Highlighter is not an exact fit for this, it seems that the term positions could still be useful? Any suggestions would be appreciated. Thanks, Fred Toth --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Dan Funk Software Engineer Information Technology Solutions Battelle Charlottesville Operations 1000 Research Park Boulevard, Suite 105 Charlottesville, Virginia 22911 434.984.0951 x244 434.984.0947 (fax) [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]