Count the number of phrase hits in a specific document

Is there a way to search for a document by id (_doc) and then count the number of times a phrase is mentioned?

Given the text in a field called 'message': "Bob Smith is a plumber. Bob Smith is also a racecar driver. Bob Smith is not an elasticsearch expert".

Could I count Bob Smith (3) some how?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.