Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: use configured OrderByExpr in _community_retrieval_ (#13683)

yH757d8d42dd98
diff --git a/rag/graphrag/search.py b/rag/graphrag/search.py
index 552b64ec99..ba57783be8 100644
--- a/rag/graphrag/search.py
+++ b/rag/graphrag/search.py
@@ -299,7 +299,7 @@ class KGSearch(Dealer):
fltr["knowledge_graph_kwd"] = "community_report"
fltr["entities_kwd"] = entities
comm_res = self.dataStore.search(fields, [], fltr, [],
- OrderByExpr(), 0, topn, idxnms, kb_ids)
+ odr, 0, topn, idxnms, kb_ids)
comm_res_fields = self.dataStore.get_fields(comm_res, fields)
txts = []
for ii, (_, row) in enumerate(comm_res_fields.items()):