shary
September 14, 2017, 12:01pm
1
“tags”: {
“type”: “nested”,
“properties”: {
“name”: {
“type”: “string”,
“index”: “not_analyzed”
},
“value”: {
“type”: “string”,
“index”: “not_analyzed”
},
// more fields, snipped
}
},
my index’s mapping is as above
ES version:5.4.3
Grafana version:4.5.0
I want to figure out the count of documents with “tags.name ” field exist.
IS the nested query supported by Grafana?
and can i write user-defined DSL in Grafana?
1 Like
torkel
September 14, 2017, 12:29pm
2
type in the query field a lucene query that checks if tags.name exists (check elasticsearch docs for lucene query syntax)
shary
September 14, 2017, 1:27pm
3
and How do I edit this request data
torkel
September 14, 2017, 1:28pm
4
you cannot edit that directly, you have to use the query editor UI (add metrics, and group bys)
shary
September 14, 2017, 1:48pm
5
i want to query a nested field “tags.name”,but found it doesn’t function. help!ths
1 Like
torkel
September 14, 2017, 1:56pm
6
that looks like a valid lucene query, should work. try tags.name:'apple'
I have the same issue but does not work. Also, i need to use metrics other than count but all the values obtained in the response are null. Following is my document structure:
{
"_index": "1",
"_type": "_doc",
"_id": "2018-11-12 7:00:00 - 2018-11-12 7:30:00",
"_score": 1,
"_source": {
"start": "2018-11-12 7:00:00"
"obj1": [
{
"key1": "value",
"key2": "value",
"key3": "value",
},
{
"key1": "value",
"key2": "value",
"key3": "value",
}
],
}
}
where type of obj1 is nested
If the type of obj1 is not kept nested then correct values are returned in the response
waelb
July 29, 2019, 8:30pm
8
@kaiwalya did you figure out a way ?
@kaiwalya ? Did you resolve your mentioned problem ? or Anybody know How can I use aggs with nested object as @kaiwalya 's example