mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
issue: Milvus query error when fetching more than 16384 entries #5978
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @julien-oss on GitHub (Aug 6, 2025).
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.6.18
Ollama Version (if applicable)
No response
Operating System
Ubuntu 24.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When querying more than 16384 entries, milvus.py should iterate queries and return top k entries
Actual Behavior
After the first iteration, offset is equal 16384 and limit 16384, resulting in error
MilvusException: <MilvusException: (code=65535, message=invalid max query result window, (offset+limit) should be in range [1, 16384], but got 32 768)>Steps to Reproduce
Have a collection > 16384 in milvus
RAG query on this collection
Logs & Screenshots
MilvusException: <MilvusException: (code=65535, message=invalid max query result window, (offset+limit) should be in range [1, 16384], but got 32 768)>Additional Information
I edited milvus.py to use collection.query_iterator() instead of client.query()
Add in milvus.py :
from pymilvus import connections, CollectionAnd change query to :
Now iteration works and we get the expected top k result
@tjbck commented on GitHub (Aug 6, 2025):
PR welcome!
@rgaricano commented on GitHub (Aug 8, 2025):
for reference:
https://github.com/milvus-io/milvus/issues/36895
https://milvus.io/docs/with-iterators.md
@tjbck commented on GitHub (Aug 13, 2025):
Addressed with ad98d4300b5e0dec0beb4db157873efde8577e1a!