are you looking for highlighting?
http://wiki.apache.org/solr/HighlightingParameters
This would give you:
In God We Trust – <em>Each</em> dollar had this
David Xiao wrote:
Is that a feature that can identify offset of keyword in search result?
For example, if there is a following text to be indexed:
In God We Trust – Each dollar had this
And user search for: Each, should return with value: 19. Means first occurs at
character 19.
I am not sure if lucene or solr will, have provide this functionality? Do you
thought that could be useful to help give some search result context? Like
google search does.
Regards,
David