Doc explore fix (#3614)

* k

* k

* add comment
This commit is contained in:
pablonyx 2025-01-06 11:42:07 -08:00 committed by GitHub
parent 2b8d3a6ef5
commit 82eab9d704
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -15,6 +15,7 @@ from onyx.document_index.vespa_constants import METADATA_LIST
from onyx.document_index.vespa_constants import SOURCE_TYPE
from onyx.document_index.vespa_constants import TENANT_ID
from onyx.utils.logger import setup_logger
from shared_configs.configs import MULTI_TENANT
logger = setup_logger()
@ -59,7 +60,8 @@ def build_vespa_filters(
filter_str = f"!({HIDDEN}=true) and " if not include_hidden else ""
if filters.tenant_id:
# 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 '
# CAREFUL touching this one, currently there is no second ACL double-check post retrieval

View File

@ -54,6 +54,7 @@ def admin_search(
query = question.query
logger.notice(f"Received admin search query: {query}")
user_acl_filters = build_access_filters_for_user(user, db_session)
final_filters = IndexFilters(
source_type=question.filters.source_type,
document_set=question.filters.document_set,