Merge "Add a more flexible queryRecentDocuments"