Querying and creating document collections