I would recommend to look into the Highlight feature[1] . There are few implementations and they should be all right for your user requirement.
Regards [1] https://lucene.apache.org/solr/guide/7_3/highlighting.html ----- --------------- Alessandro Benedetti Search Consultant, R&D Software Engineer, Director Sease Ltd. - www.sease.io -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html