From 08745e03040e7a12677e19b628a069210e39f890 Mon Sep 17 00:00:00 2001 From: He Wang Date: Tue, 18 Nov 2025 14:39:27 +0800 Subject: [PATCH] update names of doc engine helper functions --- rag/utils/ob_conn.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rag/utils/ob_conn.py b/rag/utils/ob_conn.py index bfec11aa5..6218a8c4e 100644 --- a/rag/utils/ob_conn.py +++ b/rag/utils/ob_conn.py @@ -1435,13 +1435,13 @@ class OBConnection(DocStoreConnection): Helper functions for search result """ - def getTotal(self, res) -> int: + def get_total(self, res) -> int: return res.total - def getChunkIds(self, res) -> list[str]: + def get_chunk_ids(self, res) -> list[str]: return [row["id"] for row in res.chunks] - def getFields(self, res, fields: list[str]) -> dict[str, dict]: + def get_fields(self, res, fields: list[str]) -> dict[str, dict]: result = {} for row in res.chunks: data = {} @@ -1511,7 +1511,7 @@ class OBConnection(DocStoreConnection): last_pos = token_pos return re.sub(r'', '', highlighted_txt) - def getHighlight(self, res, keywords: list[str], fieldnm: str): + def get_highlight(self, res, keywords: list[str], fieldnm: str): ans = {} if len(res.chunks) == 0 or len(keywords) == 0: return ans @@ -1527,7 +1527,7 @@ class OBConnection(DocStoreConnection): ans[d["id"]] = highlighted_txt return ans - def getAggregation(self, res, fieldnm: str): + def get_aggregation(self, res, fieldnm: str): if len(res.chunks) == 0: return []