Dear All!

I have a problem with a complex nested query
the docs like this:
_id:1
{
        "detail":[
                {
                        "date":"2014-09-01",
                        "price":50
                },
                {
                        "date":"2014-09-02",
                        "price":100
                },
                {
                        "date":"2014-09-03",
                        "price":100
                },
                {
                        "date":"2014-09-04",
                        "price":200
                }
        ]

}
_id:2
{
        "detail":[
                {
                        "date":"2014-09-01",
                        "price":100
                },
                {
                        "date":"2014-09-02",
                        "price":200
                },
                {
                        "date":"2014-09-03",
                        "price":300
                },
                {
                        "date":"2014-09-04",
                        "price":200
                }
        ]

}
I will filter the docs with "date in [2014-09-01, 2014-09-03] and sum(price) > 
300".
I only find some way with "aggregation", but it can only stat the sum of all 
docs.

How Can I solve the problem?? 


Thanks && Best Regard!


-- 
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/A98354E4-9C9F-43B2-9310-6355DE3D6F85%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to