The documents in the search results are sorted based on the similarity between the user's query and the documents, returning them in order of high relevance.