Reworked so it only printed the top 10 documents for the query