[Bug]: ES sql no restrict for docnm_kwd
Is there an existing issue for the same bug?
- [X] I have checked the existing issues.
Branch name
main
Commit ID
33eaf6fa2ecc47c2f7b892ff9dd2110a2ff2cd0a
Other environment information
runtime: SourceCode
OS type: CentOS
Actual behavior
At present, it seems that all documents will be stored in ES (one table for each user, and all documents in the current user's knowledge base are in this table).
However, when different assistants are associated with different knowledge bases, should the text2SQL query limit docnm_kwd to the docnm_kwd of the current associated knowledge base. Now it seems that there are no restrictions. If there are no errors during SQL execution, the output may be a pile of meaningless content. Even the referenced document displayed has no relation to the currently referenced knowledge base document.
Expected behavior
add "docnm_kwd" restrict for es sql
Steps to reproduce
I saw this issue https://github.com/infiniflow/ragflow/issues/559 which does not recommend mixing 'table' chunking method with other chunking methods. But I always think this restriction should be added
Additional information
No response
The 'docnm_kwd' will be used for the little exclamation mark by hovering which we can identify the source of the given row.
Anyway, I believe that there should be no references unrelated to the current associated knowledge base