iMessage: How do I search for keywords in an individual message thread? I have a 5-year conversation going on with my wife on iMessage.

Every once in a while I want to find something like a restaurant she messaged me about.

I want to search for the word "restaurant" and find ALL the times she used that word, meaning only within HER messages.

How can I do that?

I know about the universal iMessage search, but that's not what I'm after. It shows me only 1 instance of the word "restaurant," not all of them.
The archive of all the messages is in ~/Library/Messages/chat.db. It's a SQLite database. There are some SQLite viewers that will make it fairly easy to sort this data and either allow you to search it or selectively export some of it to CSV. Alternately if you search for "sqlite to csv" you'll find some more information on exporting it. Unfortunately this is a big weakness of iMessage.