Thank you Hannes, your query really work, it gives me few new ideas to try.
Actually it's strange, just by removing query by nested object, everything
Unfortunately now i have another problem, since you moved "genre": "comedy"
out of facet, this means i can have only one facet per genre per query,
which doesn't work for me, since i need more than one facet for different
genres - that is why i was adding "genre" to facet_filter.
Actually "genre" is just a showcase parameter to show my problem - in real
world i am using "_type", i just made it "genre" so it is more
In real world want to see facets of departments for specific types person
is involved in.
Which means unfortunately this query doesn't work for me
Any ideas how to allow multiple facets per different genres?
On Saturday, December 14, 2013 4:44:31 PM UTC+2, Hannes Korte wrote:
I think this search request does the trick:
"join" : false
"nested" : "credits"
On 14.12.2013 15:16, Kaspars Sprogis wrote:
Mohsin, thanks for suggestion, but it doesn't change anything, because i
using "include_in_parent": true, which means i can query without
Here i updated one of queries with nested query and results are the
One more interesting fact i just found out. If i try using "filter
count instead of terms and "facet_filter", then count is correct, but
counting for each department separately would be wrong. Strange thing
facets doesn't return same results/counts.
I also updated gist example with facet filter and also added actual
On Saturday, December 14, 2013 3:52:09 PM UTC+2, Mohsin Husen wrote:
nested object can be only queried using nested query
use nested query instead of term query
On Saturday, 14 December 2013 10:23:40 UTC, Kaspars Sprogis wrote:
I have movies index and each movie contains nested object "credits".
What i need is to get facets for departments for specific person for
In other words: facets for credit.department where genre=comedy and
Here i setup full example, with mapping and queries i tried with
One of idea was to de-normalize data and add "genre" field also to
nested object, but this is not the only field from parent i need to
future, so i don't really like this solution to duplicate so many
fields in every nested object.
I have been trying to achieve this for few days, and without any luck,
hope somebody have some better ideas.
Have anyone tried latest beta version with new aggregation features,
maybe there are features that can solve my problem?
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 email@example.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b2aec990-5e2a-4a02-a64e-98f1b4eea718%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.