Skip to content

Commit

Permalink
revise category filter
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhayhurst committed Sep 10, 2024
1 parent a0afc3b commit 141619f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/ElasticRetriever.scala
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,8 @@ class ElasticRetriever @Inject() (
.operator(Operator.OR)

val categoryFilter = category match {
case Some(categoryName) => termQuery("category.keyword", categoryName)
case None => matchAllQuery()
case None | Some("") | Some("*") => matchAllQuery()
case Some(categoryName) => termQuery("category.keyword", categoryName)
}

val filterQueries = boolQuery().must(categoryFilter) :: Nil
Expand Down

0 comments on commit 141619f

Please sign in to comment.