Search query results: summary per document

Hello!

I’m trying to find a way to display short description/summary for documents returned by HstQueryResult (or QueryResult). Is there a way to find out which document property/field contains text that matched search query?

We have a lot of different documents (types) with a lot of fields. So when rendering search results, it is hard to know, which document field contains matched text and which field content should I show in search results summary list.

I already tried Jackrabbit’s ExcpertProvider and setting searchindex configuration “supportHighlighting” to true, which should return text exceprts with highlighted words. In my case, returned excerpts did not match terms passed in query, it looked more like parts of document paths…

If your project is big and you need a lot of customization like highlight term then I suggest you integrate your Hippo project with Elastic Search. It provide more advance searching and of course you can resolve your issue of highlighting as it already worked on my project.