How to search indexes which created per day

Basically, your aim should be to reduce the number of shards you're
executing your query on. That's the reason, executing your query on all
indices will be a bad thing to do as you'll be executing your query on the
shards on which you know that the data surely doesn't exist. If you're
indices are daily indices, it's a perfectly fine way of doing it.

On Wed, Jul 3, 2013 at 1:30 PM, lijionly@gmail.com wrote:

For example, I need to search from date 2013-03-12T15:23:11 to date
2013-05-23T13:23:11, should I add all the indexes into search url like:
http://ip:9200/20130312,20130313....20130523/_search
And then in the JSON body, I need to set like this:
{
"query":{
"query_string":{
"query":"$1"
}
},
"filter":{
"range":{
"LogDate":{
"from":"2013-03-12T15:25:10",
"to":"2013-03-12T15:25:13"
}
}
}
}

Is it a efficient way?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
Regards,
Abhijeet Rastogi (shadyabhi)
http://blog.abhijeetr.com

--
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.
For more options, visit https://groups.google.com/groups/opt_out.