Quantcast
Channel: Weaviate Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 3588

Aggregate and query results mismatch

$
0
0

Hello Mohamed,

well I was using limit in my application code, however doing some more tests, I’ve found something weird:

res = collection.query.near_text(query=query, offset=0, limit=10, filters=filters, target_vector=‘search’, distance=0.69 )
print(len(res.objects))
2
res = collection.query.near_text(query=query, limit=10, filters=filters, target_vector=‘search’, distance=0.69 )
print(len(res.objects))
2
res = collection.query.near_text(query=query, limit=100, filters=filters, target_vector=‘search’, distance=0.69 )
print(len(res.objects))
6

res = collection.query.near_text(query=query, offset=0, limit=100, filters=filters, target_vector=‘search’, distance=0.69 )
print(len(res.objects))
6

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.

Let me know if you need more information.


Viewing all articles
Browse latest Browse all 3588

Trending Articles