Nested facets : only on first result document?


(Tchinkatchuk) #1

Hi everyone,

I think I misunderstood something.
I have "products" documents with a nested property called "skus"

here's the query I do :
{
"query": {
"query_string": {
"query": "*"
}
},
"facets": {
"test_nested": {
"nested": "skus",
"terms": {
"field": "myfield"
}
}
}
}

I was expected to have all hits (ok) and a facets for those hits on every
"myfield" possibilites.
Instead of that, the facet return only the first result facet -> value of
skus.myfield of the first result.

Am i wrong somewhere ?

--
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/e8e09c08-7a1c-4045-9497-bb3861bfd84f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Tchinkatchuk) #2

ok, my bad.

If anyone has the same issue, check carefully the datas you're indexing. It
was my fault.
If datas are ok, facets is ok.

Works alos with aggs in 1.0

Le dimanche 16 février 2014 17:28:05 UTC+1, Georges@Bibtol a écrit :

Hi everyone,

I think I misunderstood something.
I have "products" documents with a nested property called "skus"

here's the query I do :
{
"query": {
"query_string": {
"query": "*"
}
},
"facets": {
"test_nested": {
"nested": "skus",
"terms": {
"field": "myfield"
}
}
}
}

I was expected to have all hits (ok) and a facets for those hits on every
"myfield" possibilites.
Instead of that, the facet return only the first result facet -> value of
skus.myfield of the first result.

Am i wrong somewhere ?

--
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/cf8182f3-7b0d-4598-820f-ca294e1a94b4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #3