From 546024ed5880d50635c5f8d92136258012c31af2 Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Mon, 6 Jan 2025 11:09:33 -0800 Subject: [PATCH] add comment --- .../document_index/vespa/shared_utils/vespa_request_builders.py | 1 + backend/onyx/server/query_and_chat/query_backend.py | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/onyx/document_index/vespa/shared_utils/vespa_request_builders.py b/backend/onyx/document_index/vespa/shared_utils/vespa_request_builders.py index 7fe534d0abe..71875cb951e 100644 --- a/backend/onyx/document_index/vespa/shared_utils/vespa_request_builders.py +++ b/backend/onyx/document_index/vespa/shared_utils/vespa_request_builders.py @@ -60,6 +60,7 @@ def _build_time_filter( filter_str = f"!({HIDDEN}=true) and " if not include_hidden else "" + # If running in multi-tenant mode, we may want to filter by tenant_id if filters.tenant_id and MULTI_TENANT: filter_str += f'({TENANT_ID} contains "{filters.tenant_id}") and ' diff --git a/backend/onyx/server/query_and_chat/query_backend.py b/backend/onyx/server/query_and_chat/query_backend.py index 19f3841dce7..97316662000 100644 --- a/backend/onyx/server/query_and_chat/query_backend.py +++ b/backend/onyx/server/query_and_chat/query_backend.py @@ -55,7 +55,6 @@ def admin_search( logger.notice(f"Received admin search query: {query}") user_acl_filters = build_access_filters_for_user(user, db_session) - # If single-tenant, we do no want to filter by tenant_id (this field does not exist in Vespa) final_filters = IndexFilters( source_type=question.filters.source_type, document_set=question.filters.document_set,