Fix date searches
authorChristian Weiske <cweiske@cweiske.de>
Wed, 26 Jul 2017 13:14:46 +0000 (15:14 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 26 Jul 2017 13:14:46 +0000 (15:14 +0200)
Resolves: https://github.com/cweiske/phinde/issues/25

src/phinde/Elasticsearch.php

index c24f6cd..5ca2180 100644 (file)
@@ -92,7 +92,7 @@ class Elasticsearch
             $query      = trim(str_replace($matches[0], '', $query));
             $qMust[]    = array(
                 'range' => array(
-                    'modate' => array(
+                    'status.modate' => array(
                         'gt' => $dateAfter . '||/d',
                     )
                 )
@@ -103,7 +103,7 @@ class Elasticsearch
             $query      = trim(str_replace($matches[0], '', $query));
             $qMust[]    = array(
                 'range' => array(
-                    'modate' => array(
+                    'status.modate' => array(
                         'lt' => $dateBefore . '||/d',
                     )
                 )
@@ -114,7 +114,7 @@ class Elasticsearch
             $query      = trim(str_replace($matches[0], '', $query));
             $qMust[]    = array(
                 'range' => array(
-                    'modate' => array(
+                    'status.modate' => array(
                         'gte' => $dateExact . '||/d',
                         'lte' => $dateExact . '||/d',
                     )