Hi, I have following mapping inserted,
'searchable_tags' => array(
'type' => 'string',
),
'listing_type' => array(
'type' => 'string'
),
'listing_id' => array(
'type' => 'integer'
),
'from_date' => array(
'type' => 'date',
'format' => 'yyyy-MM-dd HH:mm:ss'
),
'to_date' => array(
'type' => 'date',
'format' => 'yyyy-MM-dd HH:mm:ss'
),
And I'm trying to filter the result by date by running following query
'query' => [
'bool' => [
'must' => [
'common' => [
"searchable_tags" => [
"query" => $searchString,
"cutoff_frequency" => 0.001
]
]
],
'filter' => [
'range' => [
'from_date' => [
[
'lte' => '2015-01-01',
"format" => "yyyy-MM-dd"
]
]
]
],
'must' => [
'term' => [
'listing_type' => $listingType
]
]
],
],
But it returns all the result despite the date range filter. Date range filter was working fine with ES 1.7 but I cant get it to work with 2.0
Could someone help me with this? whats am I doing wrong here
thanks