Jérôme Charron wrote:
This means there's no markup in the OpenSearch output?


Yes, no markup for now.

Doesn't this break any existing application that uses OpenSearch and displays summaries in a web browser? This is an incompatible change which we should avoid.

Shouldn't there be?


The restriction on description field is : "Can contain simple escaped HTML
markup, such as <b>, <i>, <a>, and <img> elements."
So, ya, why not. We can add <b> around highlights.
What you and others thinks?

+1

Perhaps this should be a method on Summary, to render it as html?


I had some hesitations about this while coding ....
In fact, as suggested in the issue's comments, I would like to add a generic
method on Summary :
String toString(Encoder, Formatter) like in the Lucene's Highlighter and
provide some basic implementations of Encoder and Formatter.

That sounds fine, but in the meantime, let's not reproduce the html-specific code in lots of places. We need it in both search.jsp and in OpenSearchServlet.java. So we should have it in a common place. A method on Summary seems like a good place. If we subsequently add a more general API then we could re-implement the toHtml() method using that API, but I think a generic toHtml() method will be useful for quite a while yet.

Doug

Reply via email to