Skip to content

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

Fix position_int on infinity (#4144)

Zhichang Yua0dc9e1bdf30
diff --git a/docker/.env b/docker/.env
index 037e401077..dce767d287 100644
--- a/docker/.env
+++ b/docker/.env
@@ -52,7 +52,7 @@ MYSQL_DBNAME=rag_flow
# allowing EXTERNAL access to the MySQL database running inside the Docker container.
MYSQL_PORT=5455
-# The hostname where the MySQL service is exposed
+# The hostname where the MinIO service is exposed
MINIO_HOST=minio
# The port used to expose the MinIO console interface to the host machine,
# allowing EXTERNAL access to the web-based console running inside the Docker container.
diff --git a/rag/utils/infinity_conn.py b/rag/utils/infinity_conn.py
index e820400fd8..3535caea35 100644
--- a/rag/utils/infinity_conn.py
+++ b/rag/utils/infinity_conn.py
@@ -404,7 +404,7 @@ class InfinityConnection(DocStoreConnection):
assert isinstance(v, list)
arr = [num for row in v for num in row]
d[k] = "_".join(f"{num:08x}" for num in arr)
- elif k in ["page_num_int", "top_int", "position_int"]:
+ elif k in ["page_num_int", "top_int"]:
assert isinstance(v, list)
d[k] = "_".join(f"{num:08x}" for num in v)
ids = ["'{}'".format(d["id"]) for d in documents]
@@ -508,7 +508,7 @@ class InfinityConnection(DocStoreConnection):
assert isinstance(v, str)
if v:
arr = [int(hex_val, 16) for hex_val in v.split('_')]
- v = [arr[i:i + 4] for i in range(0, len(arr), 4)]
+ v = [arr[i:i + 5] for i in range(0, len(arr), 5)]
else:
v = []
elif fieldnm in ["page_num_int", "top_int"]: