Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
Merge 662232b into 88f2afd
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnswaanen committed Aug 8, 2018
2 parents 88f2afd + 662232b commit 2595f9b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/AbstractElasticSearchQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ protected function withMatchPhraseQuery($fieldName, $term)

$c = $this->getClone();
$c->boolQuery->add($matchPhraseQuery, BoolQuery::FILTER);
$c->boolQuery->add($matchPhraseQuery, BoolQuery::SHOULD);
return $c;
}

Expand Down
18 changes: 18 additions & 0 deletions tests/Organizer/ElasticSearchOrganizerQueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ public function it_should_build_a_query_with_an_autocomplete_filter()
],
],
],
'should' => [
[
'match_phrase' => [
'name.nl.autocomplete' => [
'query' => 'Collectief Cursief',
],
],
],
],
],
],
];
Expand Down Expand Up @@ -215,6 +224,15 @@ public function it_should_build_a_query_with_multiple_filters()
],
],
],
'should' => [
[
'match_phrase' => [
'name.nl.autocomplete' => [
'query' => 'foo',
],
],
],
],
],
],
];
Expand Down
9 changes: 9 additions & 0 deletions tests/Organizer/ElasticSearchOrganizerSearchServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@ public function it_returns_a_paged_result_set_for_the_given_search_query()
],
],
],
'should' => [
[
'match_phrase' => [
'name.nl.autocomplete' => [
'query' => 'Collectief'
],
],
],
],
],
],
],
Expand Down

0 comments on commit 2595f9b

Please sign in to comment.