Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error: Node not found for id #4968

Open
1 task done
zhxlp opened this issue Feb 14, 2025 · 0 comments
Open
1 task done

[Bug]: Error: Node not found for id #4968

zhxlp opened this issue Feb 14, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@zhxlp
Copy link

zhxlp commented Feb 14, 2025

Is there an existing issue for the same bug?

  • I have checked the existing issues.

RAGFlow workspace code commit ID

dd0ebbe

RAGFlow image version

infiniflow/ragflow:nightly

Other environment information

Actual behavior

Error accessing knowledge graph page

Image

Expected behavior

No response

Steps to reproduce

Upload a file with a lot of text content, and when its knowledge graph nodes have more than 500 visits to the knowledge graph page, an error will occur

Additional information

ragflow/api/apps/kb_app.py

Lines 319 to 322 in 754d5ea

if "nodes" in obj["graph"]:
obj["graph"]["nodes"] = sorted(obj["graph"]["nodes"], key=lambda x: x.get("pagerank", 0), reverse=True)[:256]
if "edges" in obj["graph"]:
obj["graph"]["edges"] = sorted(obj["graph"]["edges"], key=lambda x: x.get("weight", 0), reverse=True)[:128]

There is a situation where the "source" attribute value in the first 128 items of ["graph"]["edges"] is not in the first 256 items of ["graph"]["nodes"]

There is a situation where the "target" attribute value in the first 128 items of ["graph"]["edges"] is not in the first 256 items of ["graph"]["nodes"]

@zhxlp zhxlp added the bug Something isn't working label Feb 14, 2025
zhxlp added a commit to zhxlp/ragflow that referenced this issue Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant