You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Schaeffer, David" <Da...@ca.com> on 2002/10/28 18:10:24 UTC

Highlighting search results in selected documents

With Lucene 1.0, I implemented a crude feature for identifying the first location in a document (selected from the search result set) which matched the query.  I used class QueryTokenManager, which no longer exits, to step though the tokens in the query and Java Script method findText().  This approach (especially the Java Script) was unreliable and marginal at best.

I need to revisit this feature because I can no longer use QueryTokenManager.  I wonder if anyone has a solution for allowing a user to step through the locations in a document which triggered its inclusion in the search results.  

Ian Dallas posted his XML Highlighter, but my documents are HTML.

Another post points out that it makes more sense to process the documents in the result set than it does to add the needed information to the search index.  

That leaves most of the problem unresolved.  How do you integrate the parsing of the document with the query and then modify the document to achieve the highlighting and the ability to move from one highlighted point to the next.

Please pass along any suggestions for my research.

Thanks,
David

David Schaeffer
Computer Associates
Programmer
tel: +1 856 914-8385
david.schaeffer@ca.com

 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>