File tree Expand file tree Collapse file tree 1 file changed +81
-0
lines changed
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/mapping Expand file tree Collapse file tree 1 file changed +81
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ synthetic_source text as multi-field :
3+ - requires :
4+ cluster_features : [ "mapper.source.mode_from_index_setting" ]
5+ reason : " Source mode configured through index setting"
6+
7+ - do :
8+ indices.create :
9+ index : synthetic_source_test
10+ body :
11+ settings :
12+ index :
13+ mapping.source.mode : synthetic
14+ mappings :
15+ properties :
16+ foo :
17+ type : keyword
18+ fields :
19+ text :
20+ type : text
21+
22+ - do :
23+ index :
24+ index : synthetic_source_test
25+ id : " 1"
26+ refresh : true
27+ body :
28+ foo : " Apache Lucene powers Elasticsearch"
29+
30+ - do :
31+ search :
32+ index : synthetic_source_test
33+ body :
34+ query :
35+ match_phrase :
36+ foo.text : apache lucene
37+
38+ - match : { "hits.total.value": 1 }
39+ - match :
40+ hits.hits.0._source.foo : " Apache Lucene powers Elasticsearch"
41+
42+ ---
43+ synthetic_source text with multi-field :
44+ - requires :
45+ cluster_features : [ "mapper.source.mode_from_index_setting" ]
46+ reason : " Source mode configured through index setting"
47+
48+ - do :
49+ indices.create :
50+ index : synthetic_source_test
51+ body :
52+ settings :
53+ index :
54+ mapping.source.mode : synthetic
55+ mappings :
56+ properties :
57+ foo :
58+ type : text
59+ fields :
60+ raw :
61+ type : keyword
62+
63+ - do :
64+ index :
65+ index : synthetic_source_test
66+ id : " 1"
67+ refresh : true
68+ body :
69+ foo : " Apache Lucene powers Elasticsearch"
70+
71+ - do :
72+ search :
73+ index : synthetic_source_test
74+ body :
75+ query :
76+ match_phrase :
77+ foo : apache lucene
78+
79+ - match : { "hits.total.value": 1 }
80+ - match :
81+ hits.hits.0._source.foo : " Apache Lucene powers Elasticsearch"
You can’t perform that action at this time.
0 commit comments