Hi G!
My gist was just an example of a GIST we can work with. It was not related to the use case described in this thread.
It was just another illustration of this page: http://www.elasticsearch.org/help/
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr
Le 4 décembre 2013 at 11:19:54, G.Sanchez (gs.tribu@gmail.com) a écrit:
Hi David,
Excuse me but I did not understand your example...
you have to put this one: https://gist.github.com/dadoonet/7698308 in a "script":[...] field ?
thx
G.Sanchez
Le jeudi 28 novembre 2013 22:32:42 UTC+1, David Pilato a écrit :
Yes probably your solution is here.
It could help a lot if you recreate a full test case and gist it.
Something similar to: https://gist.github.com/dadoonet/7698308
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr
Le 28 novembre 2013 at 11:38:03, tma...@gmail.com (tma...@gmail.com) a écrit:
Ok I understand. So for my need, I will have to combine the use of facet filter and filter facets:
{
"facets": {
"my_filter": {
"filter": {
"term" : { "kv.key" : "state" }
},
"nested": "kv",
"facet_filter": {
"fquery": {
"query": {
"filtered": {
"query": {
"nested": {
"path": "kv",
"query": {
"bool": {
"must" : [ { "text" :
{ "kv.key" : "state"}
},
{ "text" :
{ "kv.value" : "designed"}
}
]
}
}
}
}
}
}
}
}
}
But it still does not work. I don't understand how to combine that...
Le jeudi 21 novembre 2013 19:28:36 UTC+1, tma...@gmail.com a écrit :
Hello guys,
I'm working to integrate nested values in Kibana but I'm facing an issue with the data selected.
To detail my issue, here is my structure:
{
"mappings" : {
"fkv" : {
"properties" : {
"kv" : {
"type" : "nested",
"include_in_parent" : false,
"properties" : {
"name" : {"type" : "string"},
"value" : {"type" : "string"}
}
}
}
}
}
}
I'm trying with Kibana to search through KV nested type. With a module I'm generating the following request:
{
"facets": {
"terms": {
"terms": {
"field": "kv.key:state",
"size": 10,
"order": "count",
"exclude": []
},
"facet_filter": {
"fquery": {
"query": {
"filtered": {
"query": {
"nested": {
"path": "kv",
"query": {
"bool": {
"should": [
{
"query_string": {
"query": "*"
}
}
]
}
}
}
},
"filter": {
"bool": {
"must": [
{
"match_all": {}
},
{
"bool": {
"must": [
{
"match_all": {}
}
]
}
}
]
}
}
}
}
}
}
}
},
"size": 0
}
I'm matching some fields but unfortunately I have just 'missing fields'. I don't know how to solve this problem
Thanks for your help
PS: I someone is interested in my JS code I could provide the source
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/3d0e409b-1328-4f25-a7c8-9037f6b09266%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
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/etPan.529f0284.54e49eb4.bd3d%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/groups/opt_out.