ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Bug]: ES sql no restrict for docnm_kwd

Open yonghuili1 opened this issue 1 year ago • 2 comments

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.

image

image

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

yonghuili1 avatar May 11 '24 07:05 yonghuili1

The 'docnm_kwd' will be used for the little exclamation mark by hovering which we can identify the source of the given row.

KevinHuSh avatar May 13 '24 09:05 KevinHuSh

Anyway, I believe that there should be no references unrelated to the current associated knowledge base

yonghuili1 avatar May 13 '24 09:05 yonghuili1