I was thinking about the same thing. It shouldn't be too difficult to subclass SolrRequestHandler and build a special HighlightingRequestHandler that uses the builtin highlighting utils to do the job. I wonder if it's possible to get access to the http request body inside a SolrRequestHandler subclass. (The raw text to be highlighted would have to be passed to solr as body in an http request). Storing the raw text in the solr index is a reasonable solution for small indexes only.
--Christian -----Ursprüngliche Nachricht----- Von: Chris Hostetter [mailto:[EMAIL PROTECTED] Gesendet: Montag, 19. Februar 2007 03:00 An: solr-user@lucene.apache.org Betreff: Re: highlight search keywords on html page : When a user performs a search, I will return a list of links containing : highlighted fragments : from "pageContent". If a link is clicked, I want to return the associated : raw html back : to user AND have search keywords in it to be highlighted, just like google : cached page. i'm not really sure that Solr can help you in this case ... it only know about the data you give it -- if you want it to highlight the raw html of hte entire page, then you're going to need to store the raw html of hte entire page in the index. you can still highlight pageContent with heavy fragmentation on your main search page where you list multiple results, and then when a user picks one redo the search with an fq restricting to the doc they picked and hl.fl=rawHtml and hl.fragsize=0 so you'll get the whole highlighted without fragmentation. -Hoss