As you may have noticed, the search feature in Messages.app is pretty lacking. Finding a particular exchange in a conversation is clumsy, scrolling back is slow, and there's no way to save a chat. MessagesHistoryBrowser is a small app which attempts to fix that. It lets you search and browse comfortably and quickly through your whole Messages.app history, save chats as simple text files, and locate files (pictures) that were sent in them.
At startup, MessagesHistoryBrowser will import your Messages.app history, which may take a while depending on how large it is (typically a minute or so). Subsequent launches will just read from that import, but you can refresh it whenever you want with cmd-R.
MessagesHistoryBrowser requires Mac OS X 10.12 Sierra and above, and is distributed free of charge. The code is available on github.
version 1.5 - macOS 10.14 Mojave support, much improved performance in import.