Simplicity.

The best answer :o)

 The memory usage for highlight fields in normal responses
is not an issue.
If it becomes an issue for you, then you're roughly taking the right approach.

However, rather than write your own response writer to solve your
issue, you might consider
just your own response handler,

I should, but perhaps not for the same reasons as below.

and insert an Iterable (which will be
written as an array in the response writer).  This way, all response
writers (xml, json, etc) will work.

To my opinion, it seems that a KWIC view <http://en.wikipedia.org/wiki/KWIC> could be just a response writer, with its own configuration parameters (like size of lines), open to multiple type of queries. The only input needed is an hits object implementation.

I will try to think it in the most generic view I'm able to, if some one could find usage of that...


--
Frédéric Glorieux
École nationale des chartes
direction des nouvelles technologies et de l'informatique

Reply via email to