Search and display multiple matches

Hello!
I index the documents and all content is stored by field content. The word dog is found in the text several times; I want to output a piece of text with this word as many times as there are matches.
Tell me how to create a query, if at all possible.