Longer snippets in search results

Hi @Cult, thanks for your brilliant work on fulltextsearch.

I’ve got it up and running, but would love to be able to see longer “snippets” of text in the search results to give some more context to the docs that are found. Google usually brings back around 20-25 words, and Seafile’s implementation is similar, but I’ve not been able to get more than maybe 7-8 words on Nextcloud. Is this something that I can change in a config file?

As a bonus question, Elasticsearch is (I think) now able to return a “highlight” tag, which might be used to emphasise the search terms in the snippet. That could make scanning down many results much easier. Is this something that can be tweaked in a config, or might it be something for a future release?

Unfortunately, we’re limited by the design team about the length of the content that should be displayed, and the style (italic/bold) to be used.