|
|
|
|
|
|
|
|
res = {"total": 0, "chunks": [], "doc": renamed_doc} |
|
|
res = {"total": 0, "chunks": [], "doc": renamed_doc} |
|
|
if req.get("id"): |
|
|
if req.get("id"): |
|
|
chunk = settings.docStoreConn.get(req.get("id"), search.index_name(tenant_id), [dataset_id]) |
|
|
chunk = settings.docStoreConn.get(req.get("id"), search.index_name(tenant_id), [dataset_id]) |
|
|
|
|
|
if not chunk: |
|
|
|
|
|
return get_result(message=f"Chunk not found: {dataset_id}/{req.get('id')}", code=settings.RetCode.NOT_FOUND) |
|
|
k = [] |
|
|
k = [] |
|
|
for n in chunk.keys(): |
|
|
for n in chunk.keys(): |
|
|
if re.search(r"(_vec$|_sm_|_tks|_ltks)", n): |
|
|
if re.search(r"(_vec$|_sm_|_tks|_ltks)", n): |