Add ability to search through messages

Previous functionality used has_child on individual messages, but this proved to be a severe performance degradation in search. We should look at other ways to do this, such as appending to the "parent" document