Delete by time range with ES v1.0

I'm trying to delete document from an index based on the timestamp.
I'm using ES v1.0, so I have to use the query wrapper.

This return the wanted result :

curl -*XGET *'http://localhost:9200/test/_search?pretty=1' -d '{"query":
{"range":{"@timestamp":{"from":"2014-07-10T00:00:00","to":"2014-07-13T21:00:00"}}}}'

but this doesn't work, command is hanging :

curl -XDELETE 'http://localhost:9200/test/_query?pretty=1' -d
'{"query":
{"range":{"@timestamp":{"from":"2014-07-10T00:00:00","to":"2014-07-13T21:00:00"}}}}'

Any idea ?

--
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/80405e2e-01cd-43bf-996f-7e5851ce89a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[2014-07-14 19:49:16,154][DEBUG][action.search.type ] [Pisces]
[check][1], node[BF93qRWnRDGuT9GQozB0LQ], [P], s[STARTED]: Failed to
execute [org.elasticsearch.action.search.SearchRequest@8e75504]
org.elasticsearch.search.SearchParseException: [check][1]:
query[@timestamp:[1404950400000 TO 1405285200999]],from[-1],size[-1]: Parse
Failure [Failed to parse source [{"query":
{"range":{"@timestamp":{"from":"2014-07-10T00:00:00","to":"2014-07-13T21:00:00"}}}]]

Caused by: org.elasticsearch.common.jackson.core.JsonParseException:
Unexpected end-of-input: expected close marker for OBJECT (from [Source:
[B@22606fa9; line: 1, column: 0])
at [Source: [B@22606fa9; line: 1, column: 185]

What's the correct syntax ?

--
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/288cd182-f199-4961-8d6e-f1232b9c6896%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.