Skip to content

Commit

Permalink
Merge pull request #11 from crowdfavorite/scout-4-compatibility
Browse files Browse the repository at this point in the history
fix search query generation for laravel-scout-elastic 4.0 compatibility
  • Loading branch information
JeremyDunn authored Mar 25, 2019
2 parents b931f08 + 25976e8 commit a502558
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Engines/NestedElasticSearchEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ protected function performSearch(Builder $query, array $options = [])

if (array_key_exists('numericFilters', $options) && $options['numericFilters']) {
foreach ($options['numericFilters'] as $i => $value) {
$field = key($value['match_phrase']);
$type = $value['match_phrase'][$field]['type'];
$field = key($value['terms']);
$type = $value['terms'][$field]['type'];
if (is_array($value)) {
$value = isset($value['match_phrase'][$field]['value']) ? $value['match_phrase'][$field]['value'] : $value;
$value = isset($value['terms'][$field]['value']) ? $value['terms'][$field]['value'] : $value;

}

Expand Down

0 comments on commit a502558

Please sign in to comment.