Skip to content

Commit

Permalink
Fix hidden documents (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
Weves authored Oct 20, 2023
1 parent bc1de65 commit 76f1f17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/danswer/datastores/vespa/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def _build_vespa_filters(

# usually ignore hidden docs unless explicitly requested. We may want to
# get hidden docs on the admin panel to allow for un-hiding
filter_str = f"!({HIDDEN}=true) and " if include_hidden else ""
filter_str = f"!({HIDDEN}=true) and " if not include_hidden else ""

# Handle provided query filters
if filters:
Expand Down Expand Up @@ -632,7 +632,7 @@ def admin_retrieval(
filters: list[IndexFilter] | None,
num_to_retrieve: int = NUM_RETURNED_HITS,
) -> list[InferenceChunk]:
vespa_where_clauses = _build_vespa_filters(filters)
vespa_where_clauses = _build_vespa_filters(filters, include_hidden=True)
yql = (
VespaIndex.yql_base
+ vespa_where_clauses
Expand Down

1 comment on commit 76f1f17

@vercel
Copy link

@vercel vercel bot commented on 76f1f17 Oct 20, 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.