Seems like the question which should have answer by now, but I couldn't find it.
Couldn't find FilterBuilders class to apply a simple IN filter.
.setQuery(QueryBuilders.filteredQuery(QueryBuilders.matchAllQuery(), FilterBuilders.?????)))
Could someone point me to the right direction?
Thanks,
Eugene
mgrigorov
(Martin Grigorov)
November 2, 2015, 8:28pm
2
Hi,
Filters are merged with queries.
dadoonet
(David Pilato)
November 2, 2015, 9:05pm
3
Use a Bool Query with a filter clause.
Filter clause accepts a QueryBuilder.
I'm doing IN filter this way:
client.setQuery(QueryBuilders.constantScoreQuery(QueryBuilders.termsQuery("networkId", byNetworkId.keySet())))
Would this work?
dadoonet
(David Pilato)
November 3, 2015, 6:53am
5
I guess so. I think this should be super equivalent to the bool one.