Began code for handling hit-highlighting in articles
Posted by mholmes on 22 Nov 2007 in Activity log
Links from searches and indexes to articles should cause hits or keywords to be highlighted in the articles. This is a problem in several parts:
- Pass the highlight items to the article rendering pipeline through parameters on the URL (partly done; will need to be more sophisticated in the case of indexes).
- Run the search in XQuery (done, in
doc.xq). - Embed the phrases to be highlighted into the XML of the retrieved document (quite hard -- need to dismember the article to do that, unless I can find a hack to insert a node into a document somehow in
doc.xq). - Include our custom XSLT in the pipeline, to highlight the phrases.
- Render the match tags to highlighting in the output (done).
So there's more to do. What we have works in a basic way with non-phrase searches, but we'll need to work on 3 and 4, then go back to work on 1 once we know how it's all functioning.