Kibana 4 and JSON queries

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"
}

  }
}

}

}

Any help would be appreciated.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ae1ac49f-2faf-4f1c-827e-6a0a1ae3f5c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

@Marshall

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"
}

  }
}

}

}

Any help would be appreciated.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/bf60cb74-0c60-4c35-938f-f75acfc0051c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.