Skip to content

Commit 9d96f60

Browse files
committed
Fix multi-valued test
1 parent e61e3c7 commit 9d96f60

File tree

1 file changed

+24
-34
lines changed
  • modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/match_only_text

1 file changed

+24
-34
lines changed

modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/match_only_text/10_basic.yml

Lines changed: 24 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
setup:
22

33
- requires:
4-
cluster_features: ["gte_v7.14.0"]
4+
cluster_features: [ "gte_v7.14.0" ]
55
reason: "match_only_text was added in 7.14"
66

77
- do:
88
indices.create:
9-
index: test
9+
index: test
1010
body:
1111
mappings:
1212
properties:
@@ -16,29 +16,29 @@ setup:
1616
- do:
1717
index:
1818
index: test
19-
id: "1"
20-
body: {}
19+
id: "1"
20+
body: { }
2121

2222
- do:
2323
index:
2424
index: test
25-
id: "2"
26-
body: { "foo": "Apache Lucene powers Elasticsearch" }
25+
id: "2"
26+
body: { "foo": "Apache Lucene powers Elasticsearch" }
2727

2828
- do:
2929
index:
3030
index: test
31-
id: "3"
32-
body: { "foo": "Elasticsearch is based on Apache Lucene" }
31+
id: "3"
32+
body: { "foo": "Elasticsearch is based on Apache Lucene" }
3333

3434
- do:
3535
index:
3636
index: test
37-
id: "4"
38-
body: { "foo": "The Apache Software Foundation manages many projects including Lucene" }
37+
id: "4"
38+
body: { "foo": "The Apache Software Foundation manages many projects including Lucene" }
3939

4040
- do:
41-
indices.refresh: {}
41+
indices.refresh: { }
4242

4343
---
4444
"Field caps":
@@ -257,7 +257,7 @@ setup:
257257
"Wildcard highlighting":
258258

259259
- requires:
260-
cluster_features: ["gte_v8.3.0"]
260+
cluster_features: [ "gte_v8.3.0" ]
261261
reason: "Wildcard highlighting on match_only_text was fixed in 8.3"
262262

263263
- do:
@@ -269,7 +269,7 @@ setup:
269269
foo: "many"
270270
highlight:
271271
fields:
272-
"*": {}
272+
"*": { }
273273

274274
- match: { hits.total.value: 1 }
275275
- match: { hits.hits.0._source.foo: "The Apache Software Foundation manages many projects including Lucene" }
@@ -296,7 +296,7 @@ synthetic_source:
296296
- do:
297297
index:
298298
index: synthetic_source_test
299-
id: "1"
299+
id: "1"
300300
refresh: true
301301
body:
302302
foo: "Apache Lucene powers Elasticsearch"
@@ -312,7 +312,7 @@ synthetic_source:
312312
---
313313
tsdb:
314314
- requires:
315-
cluster_features: ["gte_v8.10.0"]
315+
cluster_features: [ "gte_v8.10.0" ]
316316
reason: bug fixed in 8.10.0
317317

318318
- do:
@@ -349,8 +349,8 @@ tsdb:
349349
- match: { "hits.total.value": 1 }
350350
- match:
351351
hits.hits.0._source:
352-
"@timestamp" : "2000-01-01T00:00:00.000Z"
353-
"dimension" : "a"
352+
"@timestamp": "2000-01-01T00:00:00.000Z"
353+
"dimension": "a"
354354
foo: "Apache Lucene powers Elasticsearch"
355355

356356
---
@@ -377,7 +377,7 @@ synthetic_source with copy_to:
377377
- do:
378378
index:
379379
index: synthetic_source_test
380-
id: "1"
380+
id: "1"
381381
refresh: true
382382
body:
383383
foo: "Apache Lucene powers Elasticsearch"
@@ -386,7 +386,7 @@ synthetic_source with copy_to:
386386
search:
387387
index: synthetic_source_test
388388
body:
389-
fields: ["copy"]
389+
fields: [ "copy" ]
390390

391391
- match: { "hits.total.value": 1 }
392392
- match:
@@ -418,7 +418,7 @@ synthetic_source match_only_text as multi-field:
418418
- do:
419419
index:
420420
index: synthetic_source_test
421-
id: "1"
421+
id: "1"
422422
refresh: true
423423
body:
424424
foo: "Apache Lucene powers Elasticsearch"
@@ -464,14 +464,6 @@ synthetic_source match_only_text as multi-field with ignored keyword as parent:
464464
index: synthetic_source_test
465465
id: "1"
466466
refresh: true
467-
body:
468-
foo: "Apache Lucene powers Elasticsearch"
469-
470-
- do:
471-
index:
472-
index: synthetic_source_test
473-
id: "2"
474-
refresh: true
475467
body:
476468
foo: [ "Apache Lucene powers Elasticsearch", "Apache" ]
477469

@@ -485,9 +477,7 @@ synthetic_source match_only_text as multi-field with ignored keyword as parent:
485477

486478
- match: { "hits.total.value": 2 }
487479
- match:
488-
hits.hits.0._source.foo: "Apache Lucene powers Elasticsearch"
489-
- match:
490-
hits.hits.1._source.foo: [ "Apache", "Apache Lucene powers Elasticsearch" ]
480+
hits.hits.0._source.foo: [ "Apache", "Apache Lucene powers Elasticsearch" ]
491481

492482
---
493483
synthetic_source match_only_text as multi-field with stored keyword as parent:
@@ -515,7 +505,7 @@ synthetic_source match_only_text as multi-field with stored keyword as parent:
515505
- do:
516506
index:
517507
index: synthetic_source_test
518-
id: "1"
508+
id: "1"
519509
refresh: true
520510
body:
521511
foo: "Apache Lucene powers Elasticsearch"
@@ -599,7 +589,7 @@ synthetic_source match_only_text with multi-field:
599589
- do:
600590
index:
601591
index: synthetic_source_test
602-
id: "1"
592+
id: "1"
603593
refresh: true
604594
body:
605595
foo: "Apache Lucene powers Elasticsearch"
@@ -686,7 +676,7 @@ synthetic_source match_only_text with stored multi-field:
686676
- do:
687677
index:
688678
index: synthetic_source_test
689-
id: "1"
679+
id: "1"
690680
refresh: true
691681
body:
692682
foo: "Apache Lucene powers Elasticsearch"

0 commit comments

Comments
 (0)