Search_query

Sir!
I want to all result between given date-
$ curl -XGET '192.168.1.24:9200/mydb2/mytype2/_search?pretty=true' -d
'{"query"
:{"match_all":{}},"filter":{"range":{"file_size":{"from":"2011-09-02","to":"201
1-10-01"}}}}'
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" :
}
}
But I want give result between 2011-09-02 and 201
1-10-01
Thanks!
On Thu, Jun 23, 2011 at 7:02 PM, Clinton Gormley clinton@iannounce.co.ukwrote:

Hi Sandeep

I wnat to execute {

"query": {"match_all":{} },
"filter" : {
"bool" : {
"must" : {"range" : {
"file_size" :
{ "from" : 10, "to" : 10000 }}},//2011-08-06
"must" : {"range" : {
"file_size" :
{ "from" : 10001, "to" : 1000000 }//here should be date
}}}
}
} This type of query on my following database please send me
example.

This is my couch database fields-

_id 1628606f4283247f269be3f8ce00486f
_rev2 -4f7058756fab1350c1b25e4832a1f7ed
author duglus
date 2011-10-01
msg How are you
location mathura
type x

Do you have your data in Elasticsearch yet?

What problem are you having when you try to do a search like that?

Note, in your previous email, you talked about grouping - the above
query doesn't group. It will just return docs that fit into your
ranges.

If you want to 'group' then you should be looking at using facets, as
Ivan pointed out.

So, given your example data, what result are you wanting? Are you able
to state the result you want in English, instead of code? For example:

I want to know the total number of docs that include the keywords
"how are you", in location "mathura", grouped by week using the date
field

clint