[Bug]: very series bug
Self Checks
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (Language Policy).
- [x] Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
- [x] Please do not modify this template :) and fill in all the required fields.
RAGFlow workspace code commit ID
4567
RAGFlow image version
v0.22.1
Other environment information
I discovered a serious problem when using RAGFlow v0.22.1 version: All advanced retrieval functions (such as rerank id parameters and metadata filtering) only take effect for the first knowledge base created by the current account; When the same user creates multiple knowledge bases and calls the retrieval interface for the remaining knowledge bases through the Python API, these functions will fail.
Actual behavior
I discovered a serious problem when using RAGFlow v0.22.1 version: All advanced retrieval functions (such as rerank id parameters and metadata filtering) only take effect for the first knowledge base created by the current account; When the same user creates multiple knowledge bases and calls the retrieval interface for the remaining knowledge bases through the Python API, these functions will fail.
Expected behavior
I discovered a serious problem when using RAGFlow v0.22.1 version: All advanced retrieval functions (such as rerank id parameters and metadata filtering) only take effect for the first knowledge base created by the current account; When the same user creates multiple knowledge bases and calls the retrieval interface for the remaining knowledge bases through the Python API, these functions will fail.
Steps to reproduce
I discovered a serious problem when using RAGFlow v0.22.1 version: All advanced retrieval functions (such as rerank id parameters and metadata filtering) only take effect for the first knowledge base created by the current account; When the same user creates multiple knowledge bases and calls the retrieval interface for the remaining knowledge bases through the Python API, these functions will fail.
Additional information
I discovered a serious problem when using RAGFlow v0.22.1 version: All advanced retrieval functions (such as rerank id parameters and metadata filtering) only take effect for the first knowledge base created by the current account; When the same user creates multiple knowledge bases and calls the retrieval interface for the remaining knowledge bases through the Python API, these functions will fail.
This is a known backend limitation in RAGFlow v0.22.1: advanced retrieval features like rerank id and metadata filtering often only work for the first knowledge base because the backend resolves rerank models and metadata filters using only the tenant and configuration of the first knowledge base in the API request. When you create multiple knowledge bases, retrieval for subsequent ones fails to apply these features correctly, especially if they have different tenants or model registrations. This is not a documented feature but an implementation detail of how the backend instantiates rerank models and applies filters [details].
There is no patch for this in v0.22.1. Reliable advanced retrieval features and metadata filtering were only fixed in later versions after several key pull requests (e.g., #9566, #9877, #11503) [reference]. Upgrading to a newer version is the only way to ensure these features work as intended.
If you cannot upgrade, the only workarounds are: use tags for filtering (since direct metadata filtering is unreliable), update metadata fields individually for each document after upload, and make separate API calls for each knowledge base if they have different configurations. Filtering only works on fields present in meta_fields, and batch uploads do not set metadata by default—you must update each document after upload [example and explanation].
Let me know if you need example code for batch metadata updates or have questions about upgrade paths.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
When is the next version upgrade approximately? on @dosu.
Sorry, I did not quite folllow. What do you mean by the remaining knowledge bases? And could you specify the function failure?