1//QUERY IN ES
2{
3 "size": 100, //default 10
4 "from": 0, //default 0
5 "query":
6 {
7 "match_all": {}
8 },
9 "filter" : {
10 "term" : {
11 "activated" : "true"
12 }
13 }
14}
15
16
17//QUERY IN JAVA
18FilteredQueryBuilder builder =
19 QueryBuilders.filteredQuery(QueryBuilders.termQuery("test",
20 "test"),FilterBuilders.termFilter("key","value"));
1FilteredQueryBuilder builder = QueryBuilders.filteredQuery(QueryBuilders.matchAllQuery(),
2 FilterBuilders.termFilter("username","stackoverflow"));