fix: BUG-073 (broken imports), BUG-009 (contact folders id=None), BUG-014 (tags assign 500), BUG-016 (search performance use_ai), BUG-030 (user delete GRANT DELETE), BUG-052 (miniapps response), BUG-047 (approval_requests columns), BUG-037 (compliance refresh), prestart.sh GRANT DELETE
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
This commit is contained in:
@@ -148,8 +148,13 @@ async def _do_search(
|
||||
user_id = uuid.UUID(current_user["user_id"])
|
||||
is_system_admin = current_user.get("is_system_admin", False)
|
||||
|
||||
# KI query understanding
|
||||
query_analysis = await llm_analyze_query(req.query, db=db, tenant_id=tenant_id)
|
||||
# KI query understanding (skip if use_ai=False for performance)
|
||||
use_ai = getattr(req, "use_ai", True)
|
||||
if use_ai:
|
||||
query_analysis = await llm_analyze_query(req.query, db=db, tenant_id=tenant_id)
|
||||
else:
|
||||
from app.plugins.builtins.unified_search.query_understanding import _fallback_query_analysis
|
||||
query_analysis = _fallback_query_analysis(req.query)
|
||||
|
||||
# Hybrid search with visibility filtering
|
||||
results = await hybrid_search(
|
||||
@@ -176,8 +181,12 @@ async def _do_search(
|
||||
"event": "calendar",
|
||||
}
|
||||
|
||||
# KI result aggregation
|
||||
aggregation = await llm_aggregate_results(results, req.query, db=db, tenant_id=tenant_id)
|
||||
# KI result aggregation (skip if use_ai=False for performance)
|
||||
if use_ai:
|
||||
aggregation = await llm_aggregate_results(results, req.query, db=db, tenant_id=tenant_id)
|
||||
else:
|
||||
from app.plugins.builtins.unified_search.query_understanding import _fallback_aggregate
|
||||
aggregation = _fallback_aggregate(results, req.query)
|
||||
|
||||
search_results = [
|
||||
SearchResult(
|
||||
|
||||
Reference in New Issue
Block a user