Retrieve metricbeat parameters from Elasticsearch using java Rest high level client

Hi Team,

We have to retrieve below parameters from our metric beat index from elasticsearch, index pattern would look like something like metricbeat-appId

All these parameters are not present in single document they are spread across multiple documents. I want to retrieve latest documents which contains below paramters using Java Rest High Client , but wondering which api to use , can you please throw some light on the approach.

parameters below,


EDIT: after some research I should use Search API and Query Builder to achieve what I need, however I want to filter multiple documents which contain different fields. So how to use QueryBuider for the same?

field1 in document 1
field2 in document2
field3 in document 3

all fields to be matched in individual document rather than in same document.

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