Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc explore fix #3614

Merged
merged 3 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
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()

Expand Down Expand Up @@ -59,7 +60,8 @@ def _build_time_filter(

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
Expand Down
1 change: 1 addition & 0 deletions backend/onyx/server/query_and_chat/query_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading