Skip to content

Commit

Permalink
Merge pull request #72 from designmynight/fix-date-based-query
Browse files Browse the repository at this point in the history
fix: require field to exist
  • Loading branch information
Will Taylor-Jackson authored Dec 6, 2018
2 parents 0379a82 + b6cdf22 commit 08bdb27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ protected function addDateBasedWhere($type, $column, $operator, $value, $boolean

$operator = $operator == '=' ? '==' : $operator;

$script = "doc.{$column}.date.{$dateType} {$operator} params.value";
$script = "doc.{$column}.size() > 0 && doc.{$column}.date.{$dateType} {$operator} params.value";

$options['params'] = ['value' => (int) $value];

Expand Down

0 comments on commit 08bdb27

Please sign in to comment.