mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-13 04:29:01 +08:00
Fix position_int on infinity (#4144)
### What problem does this PR solve? Fix position_int on infinity ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
6379a934ff
commit
a0dc9e1bdf
@ -52,7 +52,7 @@ MYSQL_DBNAME=rag_flow
|
|||||||
# allowing EXTERNAL access to the MySQL database running inside the Docker container.
|
# allowing EXTERNAL access to the MySQL database running inside the Docker container.
|
||||||
MYSQL_PORT=5455
|
MYSQL_PORT=5455
|
||||||
|
|
||||||
# The hostname where the MySQL service is exposed
|
# The hostname where the MinIO service is exposed
|
||||||
MINIO_HOST=minio
|
MINIO_HOST=minio
|
||||||
# The port used to expose the MinIO console interface to the host machine,
|
# 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.
|
# allowing EXTERNAL access to the web-based console running inside the Docker container.
|
||||||
|
@ -404,7 +404,7 @@ class InfinityConnection(DocStoreConnection):
|
|||||||
assert isinstance(v, list)
|
assert isinstance(v, list)
|
||||||
arr = [num for row in v for num in row]
|
arr = [num for row in v for num in row]
|
||||||
d[k] = "_".join(f"{num:08x}" for num in arr)
|
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)
|
assert isinstance(v, list)
|
||||||
d[k] = "_".join(f"{num:08x}" for num in v)
|
d[k] = "_".join(f"{num:08x}" for num in v)
|
||||||
ids = ["'{}'".format(d["id"]) for d in documents]
|
ids = ["'{}'".format(d["id"]) for d in documents]
|
||||||
@ -508,7 +508,7 @@ class InfinityConnection(DocStoreConnection):
|
|||||||
assert isinstance(v, str)
|
assert isinstance(v, str)
|
||||||
if v:
|
if v:
|
||||||
arr = [int(hex_val, 16) for hex_val in v.split('_')]
|
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:
|
else:
|
||||||
v = []
|
v = []
|
||||||
elif fieldnm in ["page_num_int", "top_int"]:
|
elif fieldnm in ["page_num_int", "top_int"]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user