Added support for querying subdocs