Highlighting feature is pretty useful to identify the importance and relevance of the query results. Currently Clairv does not support such feature.
A flexible way to support this would be to extend the result pattern syntax. Currently Clairv uses this pattern only to substitute all the field variables with their values. If the field value is too long, it is truncated to a fixed length hard-coded into the searcher implementation, which is rather inflexible and inconvenient. The extended syntax, for example, might allow the following configuration in a web application scenario:
${url}<br/>
$hightlight(${content}, "<b>", "</b>", 200)
The above result pattern clearly states that the result text should highlight the content field value by first truncating the value to length 200 (if needed) and then adding the "<b>" prefix and the "</b>" suffix.