I’m new to elasticsearch and just trying to get started with kibana.
I am trying to use a raw json query to query my data in kibana 4. I read
that this is possible after a great deal of searching
(https://github.com/elastic/kibana/issues/770), but nowhere could I find a
tutorial on how to actually enter (or format) the json query into kibana.
If I copy my query and paste it into the Discover page’s query bar, I am
given an error: “query malformed, no field after start object.” The same
thing happens if I use “Elasticsearch request body” from a working
visualization on a dashboard, pasted verbatim.
Here is a normal query which I can run through curl or Sense:
GET /_count
{
"query": {
"match_all": {}
}
}
But putting this into Kibana, either verbatim or without the GET /_count as
only:
{
"query": {
"match_all": {}
}
}
yields the same error.
Specifically I am trying to get this query working so I can visualize it:
GET /my_data/events/_search?search_type=count
{
"aggs": {
"events": {
"date_histogram": {
"field": "all_dates",
"interval": "month",
"format": "yyyy-MM-dd",
"min_doc_count": 0,
"extended_bounds": {
"min": "2014-01-1",
"max": "2014-12-31"
}
Even I am facing the same issue with json queries in Kibana.
Let me know if you were able to find a solution.
I tried entering a json query into the "json input box" on the
Visualization field within X-axis aggregation. But it did not work there.
Hoping that someone might be able to answer!
-Ashish
On Friday, April 10, 2015 at 12:06:04 PM UTC-5, Marshall Dyer wrote:
I’m new to elasticsearch and just trying to get started with kibana.
I am trying to use a raw json query to query my data in kibana 4. I read
that this is possible after a great deal of searching ( Support Query DSL in queries and filters · Issue #770 · elastic/kibana · GitHub), but nowhere could I find a
tutorial on how to actually enter (or format) the json query into kibana.
If I copy my query and paste it into the Discover page’s query bar, I am
given an error: “query malformed, no field after start object.” The same
thing happens if I use “Elasticsearch request body” from a working
visualization on a dashboard, pasted verbatim.
Here is a normal query which I can run through curl or Sense:
GET /_count
{
"query": {
"match_all": {}
}
}
But putting this into Kibana, either verbatim or without the GET /_count
as only:
{
"query": {
"match_all": {}
}
}
yields the same error.
Specifically I am trying to get this query working so I can visualize it:
GET /my_data/events/_search?search_type=count
{
"aggs": {
"events": {
"date_histogram": {
"field": "all_dates",
"interval": "month",
"format": "yyyy-MM-dd",
"min_doc_count": 0,
"extended_bounds": {
"min": "2014-01-1",
"max": "2014-12-31"
}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.