Skip to content

Commit 0a022ce

Browse files
committed
yaml tests iter
1 parent 4071c72 commit 0a022ce

File tree

1 file changed

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

1 file changed

+45
-2
lines changed

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

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,49 @@ synthetic_source match_only_text as multi-field:
435435
- match:
436436
hits.hits.0._source.foo: "Apache Lucene powers Elasticsearch"
437437

438+
---
439+
synthetic_source match_only_text as multi-field with stored keyword as parent:
440+
- requires:
441+
cluster_features: [ "mapper.source.mode_from_index_setting" ]
442+
reason: "Source mode configured through index setting"
443+
444+
- do:
445+
indices.create:
446+
index: synthetic_source_test
447+
body:
448+
settings:
449+
index:
450+
mapping.source.mode: synthetic
451+
mappings:
452+
properties:
453+
foo:
454+
type: keyword
455+
store: true
456+
doc_values: false
457+
fields:
458+
text:
459+
type: match_only_text
460+
461+
- do:
462+
index:
463+
index: synthetic_source_test
464+
id: "1"
465+
refresh: true
466+
body:
467+
foo: "Apache Lucene powers Elasticsearch"
468+
469+
- do:
470+
search:
471+
index: synthetic_source_test
472+
body:
473+
query:
474+
match_phrase:
475+
foo.text: apache lucene
476+
477+
- match: { "hits.total.value": 1 }
478+
- match:
479+
hits.hits.0._source.foo: "Apache Lucene powers Elasticsearch"
480+
438481
---
439482
synthetic_source match_only_text with multi-field:
440483
- requires:
@@ -477,7 +520,7 @@ synthetic_source match_only_text with multi-field:
477520
hits.hits.0._source.foo: "Apache Lucene powers Elasticsearch"
478521

479522
---
480-
synthetic_source match_only_text with store multi-field:
523+
synthetic_source match_only_text with stored multi-field:
481524
- requires:
482525
cluster_features: [ "mapper.source.mode_from_index_setting" ]
483526
reason: "Source mode configured through index setting"
@@ -497,7 +540,7 @@ synthetic_source match_only_text with store multi-field:
497540
raw:
498541
type: keyword
499542
store: true
500-
doc_value: false
543+
doc_values: false
501544

502545
- do:
503546
index:

0 commit comments

Comments
 (0)