14
14
use Sineflow \ElasticsearchBundle \Tests \App \Fixture \Acme \BarBundle \Document \Repository \ProductRepository ;
15
15
use Sineflow \ElasticsearchBundle \Tests \App \Fixture \Acme \FooBundle \Document \Customer ;
16
16
use Sineflow \ElasticsearchBundle \Tests \App \Fixture \Acme \FooBundle \Document \Provider \CustomerProvider ;
17
+ use Sineflow \ElasticsearchBundle \Tests \App \Fixture \Acme \FooBundle \Enum \CustomerTypeEnum ;
17
18
use Symfony \Contracts \Cache \CacheInterface ;
18
19
19
20
/**
@@ -41,21 +42,28 @@ class DocumentMetadataCollectorTest extends AbstractContainerAwareTestCase
41
42
'active ' => [
42
43
'type ' => 'boolean ' ,
43
44
],
45
+ 'customer_type ' => [
46
+ 'type ' => 'integer ' ,
47
+ ],
44
48
],
45
49
'fields ' => [
46
50
],
47
51
'propertiesMetadata ' => [
48
52
'name ' => [
49
53
'propertyName ' => 'name ' ,
50
54
'type ' => 'keyword ' ,
51
- 'multilanguage ' => null ,
55
+ 'propertyAccess ' => 1 ,
56
+ ],
57
+ 'customer_type ' => [
58
+ 'propertyName ' => 'customerType ' ,
59
+ 'type ' => 'integer ' ,
60
+ 'enumType ' => CustomerTypeEnum::class,
52
61
'propertyAccess ' => 1 ,
53
62
],
54
63
'active ' => [
55
- 'propertyName ' => 'active ' ,
56
- 'type ' => 'boolean ' ,
57
- 'multilanguage ' => null ,
58
- 'methods ' => [
64
+ 'propertyName ' => 'active ' ,
65
+ 'type ' => 'boolean ' ,
66
+ 'methods ' => [
59
67
'getter ' => 'isActive ' ,
60
68
'setter ' => 'setActive ' ,
61
69
],
@@ -190,43 +198,36 @@ class DocumentMetadataCollectorTest extends AbstractContainerAwareTestCase
190
198
'title ' => [
191
199
'propertyName ' => 'title ' ,
192
200
'type ' => 'text ' ,
193
- 'multilanguage ' => null ,
194
201
'propertyAccess ' => 1 ,
195
202
],
196
203
'description ' => [
197
204
'propertyName ' => 'description ' ,
198
205
'type ' => 'text ' ,
199
- 'multilanguage ' => null ,
200
206
'propertyAccess ' => 1 ,
201
207
],
202
208
'category ' => [
203
209
'propertyName ' => 'category ' ,
204
210
'type ' => 'object ' ,
205
- 'multilanguage ' => null ,
206
211
'multiple ' => null ,
207
212
'propertiesMetadata ' => [
208
213
'id ' => [
209
214
'propertyName ' => 'id ' ,
210
215
'type ' => 'integer ' ,
211
- 'multilanguage ' => null ,
212
216
'propertyAccess ' => 1 ,
213
217
],
214
218
'title ' => [
215
219
'propertyName ' => 'title ' ,
216
220
'type ' => 'keyword ' ,
217
- 'multilanguage ' => null ,
218
221
'propertyAccess ' => 1 ,
219
222
],
220
223
'tags ' => [
221
224
'propertyName ' => 'tags ' ,
222
225
'type ' => 'object ' ,
223
- 'multilanguage ' => null ,
224
226
'multiple ' => true ,
225
227
'propertiesMetadata ' => [
226
228
'tagname ' => [
227
229
'propertyName ' => 'tagName ' ,
228
230
'type ' => 'text ' ,
229
- 'multilanguage ' => null ,
230
231
'propertyAccess ' => 1 ,
231
232
],
232
233
],
@@ -240,31 +241,26 @@ class DocumentMetadataCollectorTest extends AbstractContainerAwareTestCase
240
241
'related_categories ' => [
241
242
'propertyName ' => 'relatedCategories ' ,
242
243
'type ' => 'object ' ,
243
- 'multilanguage ' => null ,
244
244
'multiple ' => true ,
245
245
'propertiesMetadata ' => [
246
246
'id ' => [
247
247
'propertyName ' => 'id ' ,
248
248
'type ' => 'integer ' ,
249
- 'multilanguage ' => null ,
250
249
'propertyAccess ' => 1 ,
251
250
],
252
251
'title ' => [
253
252
'propertyName ' => 'title ' ,
254
253
'type ' => 'keyword ' ,
255
- 'multilanguage ' => null ,
256
254
'propertyAccess ' => 1 ,
257
255
],
258
256
'tags ' => [
259
257
'propertyName ' => 'tags ' ,
260
258
'type ' => 'object ' ,
261
- 'multilanguage ' => null ,
262
259
'multiple ' => true ,
263
260
'propertiesMetadata ' => [
264
261
'tagname ' => [
265
262
'propertyName ' => 'tagName ' ,
266
263
'type ' => 'text ' ,
267
- 'multilanguage ' => null ,
268
264
'propertyAccess ' => 1 ,
269
265
],
270
266
],
@@ -278,25 +274,21 @@ class DocumentMetadataCollectorTest extends AbstractContainerAwareTestCase
278
274
'price ' => [
279
275
'propertyName ' => 'price ' ,
280
276
'type ' => 'float ' ,
281
- 'multilanguage ' => null ,
282
277
'propertyAccess ' => 1 ,
283
278
],
284
279
'location ' => [
285
280
'propertyName ' => 'location ' ,
286
281
'type ' => 'geo_point ' ,
287
- 'multilanguage ' => null ,
288
282
'propertyAccess ' => 1 ,
289
283
],
290
284
'limited ' => [
291
285
'propertyName ' => 'limited ' ,
292
286
'type ' => 'boolean ' ,
293
- 'multilanguage ' => null ,
294
287
'propertyAccess ' => 1 ,
295
288
],
296
289
'released ' => [
297
290
'propertyName ' => 'released ' ,
298
291
'type ' => 'date ' ,
299
- 'multilanguage ' => null ,
300
292
'propertyAccess ' => 1 ,
301
293
],
302
294
'ml_info ' => [
@@ -314,7 +306,6 @@ class DocumentMetadataCollectorTest extends AbstractContainerAwareTestCase
314
306
'pieces_count ' => [
315
307
'propertyName ' => 'tokenPiecesCount ' ,
316
308
'type ' => 'text ' ,
317
- 'multilanguage ' => null ,
318
309
'propertyAccess ' => 1 ,
319
310
],
320
311
'_id ' => [
0 commit comments