Skip to content

Commit

Permalink
fix: index filtering query for analytics (#99)
Browse files Browse the repository at this point in the history
* fix: index filtering query for analytics

* fix: use term query instead of match
  • Loading branch information
bietkul authored Apr 20, 2020
1 parent b5f6884 commit ef5e487
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func GetIndexFilterQueryEs6(query *es6.BoolQuery, indices ...string) *es6.BoolQu
query := es6.NewTermQuery("indices.keyword", index)
indexQueries = append(indexQueries, query)
}
query = query.Should(indexQueries...)
query = query.Must(es6.NewBoolQuery().Should(indexQueries...))
}
return query
}
Expand All @@ -28,7 +28,7 @@ func GetIndexFilterQueryEs7(query *es7.BoolQuery, indices ...string) *es7.BoolQu
query := es7.NewTermQuery("indices.keyword", index)
indexQueries = append(indexQueries, query)
}
query = query.Should(indexQueries...)
query = query.Must(es7.NewBoolQuery().Should(indexQueries...))
}
return query
}
Expand Down

0 comments on commit ef5e487

Please sign in to comment.