Print ElasticSearch logs in java console

I want to use the logs from the Get request below in my my Maven JavaFX application, for now I just want to print the data out to console (and then move on to adding it into an array). Would this be possible?

I've tried using QueryBuilder, SearchRequest and SearchHits and can't get back any results (think I'm writing it incorrectly).

Thanks in advance.

{
"query": {
"bool": {
"should": [
{ "match": { "beat.name": "windows-control-1"}},
{ "match": { "beat.name": "windows-control-2"}},
{ "match": { "beat.name": "windows-control-3" }},
{ "match": { "beat.name": "windows-control-4" }},
{ "match": { "beat.name": "windows-control-5" }}
]
}
},
"_source": ["event_id", "hour"],
"size": 100,
"sort" : [ { "hour.keyword" : {"order" : "asc"}}]
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.