mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-05 15:20:30 +08:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user