Thank You Soo much :)

On Sat, Apr 11, 2015 at 1:22 PM, <christ...@elastic.co> wrote:

> Hi,
>
> The ability to specify time zone as part of the query was added for the
> 1.4.0 release [1]. Assuming you are on 1.4.0 or later, your query should
> look like this:
>
> GET _search
> {
>   "query": {
>     "bool": {
>       "should": [
>        {
>           "range": {
>             "DateTime": {
>               "gt": "2015-03-01",
>               "lte": "2015-03-09",
>              "time_zone":"+05:00"
>             }
>           }
>         }
>       ]
>     }
>   }
> }
>
> [1] https://github.com/elastic/elasticsearch/pull/7113
>
> Best regards,
>
> Christian
>
>
>
> On Tuesday, April 7, 2015 at 9:55:01 AM UTC+1, James Crone wrote:
>
>> Hello!
>>
>> My query is this:
>>
>> GET _search
>> {
>>   "query": {
>>     "bool": {
>>       "should": [
>>        {
>>           "range": {
>>             "DateTime": {
>>               "gt": "2015-03-01",
>>               "lte": "2015-03-09"
>>             }
>>           }
>>         }
>>       ]
>>     }
>>   }
>> }
>> Result is:
>>
>> {
>>    "took": 2,
>>    "timed_out": false,
>>    "_shards": {
>>       "total": 11,
>>       "successful": 11,
>>       "failed": 0
>>    },
>>    "hits": {
>>       "total": 1,
>>       "max_score": 1,
>>       "hits": [
>>          {
>>             "_index": "completedata",
>>             "_type": "users",
>>             "_id": "1",
>>             "_score": 1,
>>             "_source": {
>>                "ID": 1,
>>                "User_ID": 1,
>>                "Name": "Saudia Arabia Bomb",
>>                "Text": "Saudia Arabia Bomb",
>>                "Status": "online",
>>                "DateTime": "2015-03-10T00:00:00.000+05:00",
>>                "categories_ID": 1
>>             }
>>          }
>>       ]
>>    }
>> }
>>
>> mapping for date is:
>>
>> "DateTime" : {
>>             "type" : "date",
>>             "format" : "dateOptionalTime"
>>           }
>>
>> It returns me the result of "2015-03-10".How can i get exact result by 
>> matching Date? Any Idea?
>>
>>
>>
>>
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "elasticsearch" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/elasticsearch/I38DgJxqS9U/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> elasticsearch+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/249d02b3-26d5-4288-92ef-b25d9ce9a64b%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/249d02b3-26d5-4288-92ef-b25d9ce9a64b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit 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/CABjqkR8dQAo%2B_ZE0XhMSW9qBWh8qprYCyY%3DJyNbXKT2zX1Rrhg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to