Skip to content

Conversation

@likenamehaojie
Copy link
Contributor

@likenamehaojie likenamehaojie commented Aug 28, 2025

What problem does this PR solve?

Fix bug: when the document doesn't have meta data. It can't be retrieved.

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 🐖api The modified files are located under directory 'api/apps/sdk' 🐞 bug Something isn't working, pull request that fix bug. labels Aug 28, 2025
@KevinHuSh
Copy link
Collaborator

Appreciations!
Could you paste a screenshot or something to illustrate why people need this feature?

@yingfeng yingfeng added the ci Continue Integration label Aug 29, 2025
@KevinHuSh KevinHuSh removed the ci Continue Integration label Aug 29, 2025
@likenamehaojie
Copy link
Contributor Author

老用户如果使用dify外挂知识库后,直接升级到20.4版本后,会什么都检索不到@KevinHuSh

@likenamehaojie
Copy link
Contributor Author

这是一个dify的对接SDK的修复
之前我提交了一个片断,是dify sdk不能接收元数据请求
合并之后
如果dify外挂ragflow会出现拿不到那些没有设置元数据的文档,当然前提是dify在外挂时可以默认不传递元数据过滤,只不过ragflow中提供的(dify sdk)已经主动过滤了 没有 设置元数据 的文档(这是之前我提交代码的一个bug)这个pr已经修复,主要就是解决这个问题@KevinHuSh

@KevinHuSh
Copy link
Collaborator

We've considered the meta data as a filter rather than a ranker(matched docs rank ahead of unmatched docs).
Could you elaberate on the scenario you're encountered? Share with us please.

@JinHai-CN JinHai-CN changed the title bugfix when document not have metadata ,then cant retrivev bugfix when document not have metadata ,then cant retrieval Sep 2, 2025
@JinHai-CN JinHai-CN changed the title bugfix when document not have metadata ,then cant retrieval bugfix when document not have metadata ,then cant retrieved Sep 2, 2025
@likenamehaojie
Copy link
Contributor Author

Background:
This is to address different permission scopes for multiple documents in a knowledge base within Dify. Based on different logged-in users, restrict the documents that different users can retrieve from the same knowledge base.

In v0.20.3, Ragflow added document-level metadata filtering. For this, we modified the SDKs of both Dify and Ragflow.
In the previous version, we resolved this issue but simultaneously introduced a new bug. This bug causes Dify users to retrieve no content when using an external Ragflow without enabling metadata (specifically, when metadata is not enabled for documents in Ragflow).@KevinHuSh

@KevinHuSh
Copy link
Collaborator

Appreciations!
By our evaluations, this feature is not going to be merged into main branch.

@KevinHuSh KevinHuSh closed this Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐖api The modified files are located under directory 'api/apps/sdk' 🐞 bug Something isn't working, pull request that fix bug. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants