Elasticsearch REST API Commands

Hi Team,

I need a help for understanding the O/P of REST API commands while running through Dev Console in Kibana Dashboard.

  1. While doing search of an item, apart from result the O/P shows so many other details. Is there anyway we can suppress those details
    (For Example like kernel, codename, family, version for OS ).

  2. The time is showing in Kibana console in right hand corner in "ms" while doing a search operation. Is it for all items or only for first few records.
    For Example:- With the ("sequence" : "788607284") we had around 3M of records resides under a particular index, so when I queried the DB with REST API command it is returning result in 213ms so is it for all 3M records or first few records.

Below is the search command for same.

GET /elastic/_search
{
"query" : {
"term" : { "sequence" : "788607284" }
}
}

Thanks,
Debasis

Hi Team,

Could you please help me to clarify my above query.

Thanks,
Debasis

It's not returning all the records but it's counting all the matching records if you wish...

Not sure what O/P means.

@dadoonet thanks for response.
When I am running a REST API query in Kibana DEV Console, then right hand side will display result (O/P) as attached in screenshot.
So I had two questions here.

  1. How we can suppress the unwanted things and display only records to users. If it
    possible or not.
  2. As per above example, if sequence value with "788607284" matches 3M of records.
    Is the right hand side pane will display all 3M records or it is few number of records.

Thanks,
Debasis

Elasticsearch API by default only returns the first 10 documents.
About what you want to remove, you can use filter_path parameter in your API call.

But note that this tool is for developers and not intended for final users.

Instead use the discover menu and save your search which you can add then in a dashboard.

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