From d9a4e4cc3bfc6e97283faf2fa688794ce19d39e3 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Tue, 7 Jan 2025 19:06:31 +0800 Subject: [PATCH] Fix page size error. (#4401) ### What problem does this PR solve? #4400 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/nlp/search.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rag/nlp/search.py b/rag/nlp/search.py index 9b0e1d5cd..388fe3fe9 100644 --- a/rag/nlp/search.py +++ b/rag/nlp/search.py @@ -371,6 +371,7 @@ class Dealer: "count": v["count"]} for k, v in sorted(ranks["doc_aggs"].items(), key=lambda x:x[1]["count"] * -1)] + ranks["chunks"] = ranks["chunks"][:page_size] return ranks