Ability to pass a query to filter documents before analysis

Hey,
I've added the ability to pass in a query object which allows the user to select a subset of documents before analysis, as an alternative to limit.  This implies that you already know something about the schema of the data, but I've found it useful and others may do as well.