Sort query kibana (in the search window)


(R Heng) #1

Is there a way to create a search query in kibana

I have multiple entries, and i want to return that last one.

Here's the query i ran in elasticsearch which returns the latest entry. I want to do that in kibana. I tried to use this query in the search bar of kibana, but i'm not sure if sort works. Or if maybe my syntax is not correct.

{
"sort": [
{ "chargeback.process_date": "desc"}
],
"size": 1
}


(Spencer Alger) #2

The search bar in Kibana lets you enter a search "query" specifically, not the entire search request (which is what your example shows). In discover you can sort by a column in the table, and you can then put that table on the dashboard. Is this sufficient?


(R Heng) #3

I tried to use "query" but I get an error from kibana. I did the following command (below), this got me the results that i wanted, it return the latest value, but now the other dates won't show up if i drill down on them due to this search constraint.

{ "range" : { "chargeback.process_date" : { "gte" : "now/d" }}}

Can you provide me with the "query" string example?


(system) #4