Everything looks correct to me though it’s not a complete script so I can not 
reproduce it.

It might be an issue with the tool you are using to send the request.
Because you are doing a GET _search (which is correct), some browsers/tools 
don’t support GET with a body.
So you end up running a match_all query…

But if you can see aggregation results, that’s not the problem here.

May be a full Sense script could help?


-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet <https://twitter.com/dadoonet> | @elasticsearchfr 
<https://twitter.com/elasticsearchfr> | @scrutmydocs 
<https://twitter.com/scrutmydocs>



> Le 26 nov. 2014 à 15:20, Artem Frolov <kee...@gmail.com> a écrit :
> 
> Please, help me with the bool filter in my query. I need a products which 
> contain markdowned SKUs which have stock more than 0. I wrote the query, but 
> it returns me the markdowned products only (including those, which skus have 
> stock = 0). Here's the query. 
> https://gist.github.com/ArFeRR/12610c52a57dce9b0728 My the 'skus' is mapped 
> as a 'type: object' in my 'product' index. Please, help, guys.
> Here's my product index mapping. (One product has many SKUs).
> https://gist.github.com/ArFeRR/772a75775dd972e72778
> So, I need to get only those products, which are markdowned and which 
> markdowned SKUs have stock more than 0. I hope i wrote everything neccesary. 
> Please, help!
> 
> 
> -- 
> 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+unsubscr...@googlegroups.com 
> <mailto:elasticsearch+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elasticsearch/02498b46-4338-4363-a6b6-80fb446fa625%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/elasticsearch/02498b46-4338-4363-a6b6-80fb446fa625%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/46EBB7D0-DCF4-42D5-8C08-2F3CA57FC247%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to