I have a problem with understanding how to make json object in java. I have to get certain data from elasticsearch through java and I also have a json that functions, but I have no idea how to make such json with functions available.
Is it possible to do this with the SearchResponse class and its functions?
Might QueryBuilder help?
This works with the Sense plugin in chrome:
GET _search
{
"query": {
"constant_score": {
"filter": {
"and": {
"filters": [
{"term":
{"_type":"budget"}
},
{"term":
{"_index":"dbs_project"}
},
{"term":
{"month":"x"}
},
{"term":
{"account_id":"y"}
}
]
}
}
}
}
}