Skip to content

Commit

Permalink
Fix admin search
Browse files Browse the repository at this point in the history
  • Loading branch information
Weves committed Oct 23, 2023
1 parent 89807c8 commit a014cb7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions backend/danswer/server/search_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@

class AdminSearchRequest(BaseModel):
query: str
filters: IndexFilters


class AdminSearchResponse(BaseModel):
Expand All @@ -76,14 +75,13 @@ def admin_search(
db_session: Session = Depends(get_session),
) -> AdminSearchResponse:
query = question.query
filters = question.filters
logger.info(f"Received admin search query: {query}")

user_acl_filters = build_access_filters_for_user(user, db_session)
final_filters = IndexFilters(
source_type=filters.source_type,
document_set=filters.document_set,
time_cutoff=filters.time_cutoff,
source_type=None,
document_set=None,
time_cutoff=None,
access_control_list=user_acl_filters,
)
document_index = get_default_document_index()
Expand Down

1 comment on commit a014cb7

@vercel
Copy link

@vercel vercel bot commented on a014cb7 Oct 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.