Added support for querying documents by tag ID