Refine handling of POST /api/v1/datasets/search in GO (#15583)

### What problem does this PR solve?

Refine handling of POST /api/v1/datasets/search in GO

### Type of change

- [x] Refactoring
This commit is contained in:
qinling0210
2026-06-08 11:49:37 +08:00
committed by GitHub
parent 074c331cdf
commit c960dc2a4c
70 changed files with 8580 additions and 1915 deletions

View File

@@ -546,6 +546,17 @@ class InfinityConnectionBase(DocStoreConnection):
except Exception as e:
self.logger.warning(f"Failed to create index on kb_id for {table_name}: {e}")
# Create secondary index on meta_fields for metadata filter queries
try:
inf_table.create_index(
f"idx_{table_name}_meta_fields",
IndexInfo("meta_fields", IndexType.Secondary),
ConflictType.Ignore,
)
self.logger.debug(f"INFINITY created secondary index on meta_fields for table {table_name}")
except Exception as e:
self.logger.warning(f"Failed to create index on meta_fields for {table_name}: {e}")
self.logger.debug(f"INFINITY created document metadata table {table_name} with secondary indexes")
return True