My solution to only search between the actual document, not including the meta data

The problem is, I create a subset of the document and it is all stuffed
into a variable, in memory - ouch. Not sure how to search only part of
the document, all while just scanning the document from start to end.