5
5
*/
6
6
namespace Magento \Elasticsearch \SearchAdapter ;
7
7
8
- use Magento \Elasticsearch \Model \Config ;
9
-
10
8
/**
11
9
* Class AdapterTest
12
10
*
@@ -26,7 +24,7 @@ class AdapterTest extends \Magento\Framework\Search\Adapter\Mysql\AdapterTest
26
24
/**
27
25
* @var string
28
26
*/
29
- protected $ searchEngine = Config:: ENGINE_NAME ;
27
+ protected $ searchEngine = ' elasticsearch6 ' ;
30
28
31
29
/**
32
30
* Get request config path
@@ -43,12 +41,12 @@ protected function getRequestConfigPath()
43
41
*/
44
42
protected function createAdapter ()
45
43
{
46
- return $ this ->objectManager ->create (\Magento \Elasticsearch \SearchAdapter \Adapter::class);
44
+ return $ this ->objectManager ->create (\Magento \Elasticsearch \Elasticsearch5 \ SearchAdapter \Adapter::class);
47
45
}
48
46
49
47
/**
50
48
* @magentoAppIsolation enabled
51
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
49
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
52
50
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
53
51
*/
54
52
public function testMatchQuery ()
@@ -58,7 +56,7 @@ public function testMatchQuery()
58
56
59
57
/**
60
58
* @magentoAppIsolation enabled
61
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
59
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
62
60
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
63
61
*/
64
62
public function testMatchOrderedQuery ()
@@ -70,7 +68,7 @@ public function testMatchOrderedQuery()
70
68
71
69
/**
72
70
* @magentoAppIsolation enabled
73
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
71
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
74
72
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
75
73
*/
76
74
public function testAggregationsQuery ()
@@ -80,7 +78,7 @@ public function testAggregationsQuery()
80
78
81
79
/**
82
80
* @magentoAppIsolation enabled
83
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
81
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
84
82
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
85
83
*/
86
84
public function testMatchQueryFilters ()
@@ -92,7 +90,7 @@ public function testMatchQueryFilters()
92
90
* Range filter test with all fields filled
93
91
*
94
92
* @magentoAppIsolation enabled
95
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
93
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
96
94
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
97
95
*/
98
96
public function testRangeFilterWithAllFields ()
@@ -104,7 +102,7 @@ public function testRangeFilterWithAllFields()
104
102
* Range filter test with all fields filled
105
103
*
106
104
* @magentoAppIsolation enabled
107
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
105
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
108
106
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
109
107
*/
110
108
public function testRangeFilterWithoutFromField ()
@@ -116,7 +114,7 @@ public function testRangeFilterWithoutFromField()
116
114
* Range filter test with all fields filled
117
115
*
118
116
* @magentoAppIsolation enabled
119
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
117
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
120
118
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
121
119
*/
122
120
public function testRangeFilterWithoutToField ()
@@ -128,7 +126,7 @@ public function testRangeFilterWithoutToField()
128
126
* Term filter test
129
127
*
130
128
* @magentoAppIsolation enabled
131
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
129
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
132
130
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
133
131
*/
134
132
public function testTermFilter ()
@@ -140,7 +138,7 @@ public function testTermFilter()
140
138
* Term filter test
141
139
*
142
140
* @magentoAppIsolation enabled
143
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
141
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
144
142
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
145
143
*/
146
144
public function testTermFilterArray ()
@@ -152,7 +150,7 @@ public function testTermFilterArray()
152
150
* Term filter test
153
151
*
154
152
* @magentoAppIsolation enabled
155
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
153
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
156
154
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
157
155
*/
158
156
public function testWildcardFilter ()
@@ -164,7 +162,7 @@ public function testWildcardFilter()
164
162
* Request limits test
165
163
*
166
164
* @magentoAppIsolation enabled
167
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
165
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
168
166
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
169
167
*/
170
168
public function testSearchLimit ()
@@ -176,7 +174,7 @@ public function testSearchLimit()
176
174
* Bool filter test
177
175
*
178
176
* @magentoAppIsolation enabled
179
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
177
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
180
178
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
181
179
*/
182
180
public function testBoolFilter ()
@@ -188,7 +186,7 @@ public function testBoolFilter()
188
186
* Test bool filter with nested negative bool filter
189
187
*
190
188
* @magentoAppIsolation enabled
191
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
189
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
192
190
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
193
191
*/
194
192
public function testBoolFilterWithNestedNegativeBoolFilter ()
@@ -200,7 +198,7 @@ public function testBoolFilterWithNestedNegativeBoolFilter()
200
198
* Test range inside nested negative bool filter
201
199
*
202
200
* @magentoAppIsolation enabled
203
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
201
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
204
202
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
205
203
*/
206
204
public function testBoolFilterWithNestedRangeInNegativeBoolFilter ()
@@ -213,7 +211,7 @@ public function testBoolFilterWithNestedRangeInNegativeBoolFilter()
213
211
*
214
212
* @dataProvider elasticSearchAdvancedSearchDataProvider
215
213
* @magentoAppIsolation enabled
216
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
214
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
217
215
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
218
216
* @param string $nameQuery
219
217
* @param string $descriptionQuery
@@ -259,7 +257,7 @@ public function elasticSearchAdvancedSearchDataProvider()
259
257
/**
260
258
* @magentoAppIsolation enabled
261
259
* @magentoDataFixture Magento/Framework/Search/_files/filterable_attribute.php
262
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
260
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
263
261
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
264
262
*/
265
263
public function testCustomFilterableAttribute ()
@@ -274,7 +272,7 @@ public function testCustomFilterableAttribute()
274
272
*
275
273
* @magentoAppIsolation enabled
276
274
* @magentoDataFixture Magento/Framework/Search/_files/filterable_attributes.php
277
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
275
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
278
276
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
279
277
* @dataProvider filterByAttributeValuesDataProvider
280
278
* @param string $requestName
@@ -294,7 +292,7 @@ public function testFilterByAttributeValues($requestName, $additionalData)
294
292
* @param $rangeFilter
295
293
* @param $expectedRecordsCount
296
294
* @magentoDataFixture Magento/Framework/Search/_files/date_attribute.php
297
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
295
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
298
296
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
299
297
* @magentoAppIsolation enabled
300
298
* @dataProvider dateDataProvider
@@ -309,7 +307,7 @@ public function testAdvancedSearchDateField($rangeFilter, $expectedRecordsCount)
309
307
/**
310
308
* @magentoDataFixture Magento/Framework/Search/_files/product_configurable.php
311
309
* @magentoAppIsolation enabled
312
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
310
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
313
311
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
314
312
*/
315
313
public function testAdvancedSearchCompositeProductWithOutOfStockOption ()
@@ -320,7 +318,7 @@ public function testAdvancedSearchCompositeProductWithOutOfStockOption()
320
318
/**
321
319
* @magentoDataFixture Magento/Framework/Search/_files/product_configurable_with_disabled_child.php
322
320
* @magentoAppIsolation enabled
323
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
321
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
324
322
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
325
323
*/
326
324
public function testAdvancedSearchCompositeProductWithDisabledChild ()
@@ -333,7 +331,7 @@ public function testAdvancedSearchCompositeProductWithDisabledChild()
333
331
/**
334
332
* @magentoDataFixture Magento/Framework/Search/_files/search_weight_products.php
335
333
* @magentoAppIsolation enabled
336
- * @magentoConfigFixture default/catalog/search/engine elasticsearch
334
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
337
335
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
338
336
*/
339
337
public function testSearchQueryBoost ()
0 commit comments