implement elasticsearch filter in java
//QUERY IN ES
{
"size": 100, //default 10
"from": 0, //default 0
"query":
{
"match_all": {}
},
"filter" : {
"term" : {
"activated" : "true"
}
}
}
//QUERY IN JAVA
FilteredQueryBuilder builder =
QueryBuilders.filteredQuery(QueryBuilders.termQuery("test",
"test"),FilterBuilders.termFilter("key","value"));