I’m trying to perform a pagination using weaviate as near_text search. So I need the total count of results using aggregate, and then I move inside results with limit and offset. However the total count of results given by the aggregate function it’s different from the results taken from the query.
Welcome to our community! It’s great to have you here.
The difference in results between the aggregate and query is a result of how Weaviate handles aggregation vs. query searches. The aggregate method retrieves all potential matches within the distance , but the query method also takes into account ranking and limits . By default, the query returns only the top results ranked by relevance, which is why the query returns fewer results compared to the total count from the aggregation.
I’ve seen your ticket in our support system. Let’s continue working together there since you’re using a Cloud cluster.
If I limit my results to 10 I get only 2 results, if I go to 100 I get all 6. I have a pagination with 10 results per page so I was getting 2 in the app, but I expect to get all 6.