Elasticsearch Range Filter

(Hilal) #1

I am using PHP 5.1, Mysql and Elasticsearch 2.1.
I indexed my datas to Elasticsearch from Mysql .
I am doing filter and query now. I have date field.
I want to do date range filter and query.

My codes:


My query on URL: 00:00:00&date_lte=2015-31-01

Unfortunately it dosen't return results. Please help me

Date format incorrect results
(David Pilato) #2

Does it work with date_gte=2013-01-01&date_lte=2015-01-01?

Make sure your date format is the same as defined in the mapping.

(Hilal) #3

Date mapping code:


(David Pilato) #4

Not the same format as the query you sent. Read the doc about date mapping and its default format.

(Hilal) #5

I read.


Is it true?

(David Pilato) #6

Try with:

(Hilal) #7

ok It is done Thank you

(system) #8