Skip to content

Commit

Permalink
Merge pull request #3874 from nulib/4549-search-processor-published
Browse files Browse the repository at this point in the history
Update the search processor to filter out unpublished works
  • Loading branch information
bmquinn authored Mar 8, 2024
2 parents b4dbe61 + 1a53028 commit 1ec5cab
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions app/lib/meadow/search/index.ex
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,19 @@ defmodule Meadow.Search.Index do
"filter_query" => %{
"description" => "Restricts requests to publicly visible documents",
"query" => %{
"terms" => %{
"visibility" => ["public", "authenticated"]
"bool" => %{
"must" => [
%{
"terms" => %{
"visibility" => ["Public", "Institution"]
}
},
%{
"term" => %{
"published" => true
}
}
]
}
}
}
Expand Down

0 comments on commit 1ec5cab

Please sign in to comment.