Hi,
I have inherited an application which uses Solr search and the PHP Solr
API (http://pecl.php.net/package/solr). While the list of search results
with appropriate highlighting is all good, when selecting a result that
navigates to an individual article the users want to have all the hits
highlighted in the full text.
The problem is that the article text is HTML and Solr appears to strip
the HTML by default. The highlight snippets contain no formatting and
neither does the "stored" version of the text. This means that using a
large snippet size and using the returned text as the article text is
not satisfactory, nor is using the stored version returned by the return
response.
Obtaining offset information from the search and applying the
highlighting myself within the webapp using the HTML version would be
fine, but the offsets will be wrong due to the stripping of the tags.
Does anyone have any advice on how I might get this to work, it doesn't
seem to be a particularly unusual use case yet I could not find
information on how to achieve it. It's likely I'm overlooking something
simple. Anyone have any advice?
Thanks.
Scott.
- PHP Solr API Scott Yeadon
-