Using the excerpts method, I have some keywords with 5 words around, but not the original text with highlighted keywords.
How can I extract tokenized keywords and highlight them in the original text?
Sphinx allows you to specify retrieving more than five words around the matches: http://sphinxsearch.com/docs/current.html#api-func-buildexcerpts http://pat.github.io/thinking-sphinx/excerpts.html
But I don't think there's any way to have the entirety of the original text returned - you could set around to be very, very big, but Sphinx probably isn't built to handle that reliably/quickly. Perhaps it's worth looking at other tools to handle this aspect?