Hm, I see your predicament. I can't think of a way of doing it that doesn't involve what cory initially mentioned about querying all prior versions and combining the results. For old docs you could emit [doc_type, version='1.0', signed, last_login]. I assume too that you'd only emit the latests eula for each user.

You'd probably also have to emit [doc_type, version, last_login] to allow querying of old versions without caring about being signed.