Skip to content

Commit

Permalink
Use filter instead of must
Browse files Browse the repository at this point in the history
  • Loading branch information
lenguyenthanh committed Jun 10, 2024
1 parent 22463cd commit 46fdb19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/core/src/main/scala/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ extension (queries: List[Query])
def compile: Query = queries match
case Nil => matchAllQuery()
case q :: Nil => q
case _ => boolQuery().must(queries)
case _ => boolQuery().filter(queries)
2 changes: 1 addition & 1 deletion modules/core/src/main/scala/study.scala
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object StudyQuery:
multiMatchQuery(
parsed.terms.mkString(" ")
).fields(searchableFields*).analyzer("english").matchType("most_fields")
must {
boolQuery().filter {
matcher :: List(
parsed("owner").map(termQuery(Fields.owner, _)),
parsed("member").map(member =>
Expand Down

0 comments on commit 46fdb19

Please sign in to comment.