Skip to content

Commit 189a823

Browse files
author
Prabhu Ram
committed
MC-21228: Support partial word search in Elasticsearch
- Added unit test case
1 parent 68e1179 commit 189a823

File tree

1 file changed

+22
-0
lines changed
  • app/code/Magento/Elasticsearch/Test/Unit/SearchAdapter/Query/Builder

1 file changed

+22
-0
lines changed

app/code/Magento/Elasticsearch/Test/Unit/SearchAdapter/Query/Builder/MatchTest.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,28 @@ public function buildDataProvider(): array
199199
],
200200
],
201201
'2<75%'
202+
],
203+
'match_phrase_prefix query with minimum_should_match' => [
204+
'"fitness bottle"',
205+
[
206+
[
207+
'field' => 'name',
208+
'boost' => 5,
209+
'matchCondition' => 'match_phrase_prefix'
210+
]
211+
],
212+
[
213+
[
214+
'match_phrase_prefix' => [
215+
'name' => [
216+
'query' => 'fitness bottle',
217+
'boost' => 6,
218+
'minimum_should_match' => '2<75%',
219+
],
220+
],
221+
],
222+
],
223+
'2<75%'
202224
]
203225
];
204226
}

0 commit comments

Comments
 (0)