Skip to content

Commit 0ed6a2b

Browse files
committed
add test for opting out via keep all
1 parent 949f42f commit 0ed6a2b

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/mget/90_synthetic_source.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,93 @@ keyword with normalizer:
138138
keyword_with_ignore_above: [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
139139
keyword_without_doc_values: [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
140140

141+
---
142+
keyword with normalizer, source keep mode all:
143+
- do:
144+
indices.create:
145+
index: test-keyword-with-normalizer
146+
body:
147+
settings:
148+
analysis:
149+
normalizer:
150+
lowercase:
151+
type: custom
152+
filter:
153+
- lowercase
154+
index:
155+
mapping.source.mode: synthetic
156+
157+
mappings:
158+
properties:
159+
keyword:
160+
type: keyword
161+
normalizer: lowercase
162+
synthetic_source_keep: all
163+
keyword_with_ignore_above:
164+
type: keyword
165+
normalizer: lowercase
166+
ignore_above: 10
167+
keyword_without_doc_values:
168+
type: keyword
169+
normalizer: lowercase
170+
doc_values: false
171+
172+
- do:
173+
index:
174+
index: test-keyword-with-normalizer
175+
id: 1
176+
body:
177+
keyword: "the Quick Brown Fox jumps over the lazy Dog"
178+
keyword_with_ignore_above: "the Quick Brown Fox jumps over the lazy Dog"
179+
keyword_without_doc_values: "the Quick Brown Fox jumps over the lazy Dog"
180+
181+
- do:
182+
index:
183+
index: test-keyword-with-normalizer
184+
id: 2
185+
body:
186+
keyword: "The five BOXING wizards jump Quickly"
187+
keyword_with_ignore_above: "The five BOXING wizards jump Quickly"
188+
keyword_without_doc_values: "The five BOXING wizards jump Quickly"
189+
190+
- do:
191+
index:
192+
index: test-keyword-with-normalizer
193+
id: 3
194+
body:
195+
keyword: [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
196+
keyword_with_ignore_above: [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
197+
keyword_without_doc_values: [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
198+
199+
- do:
200+
mget:
201+
index: test-keyword-with-normalizer
202+
body:
203+
ids: [ 1, 2, 3 ]
204+
- match: { docs.0._index: "test-keyword-with-normalizer" }
205+
- match: { docs.0._id: "1" }
206+
- match:
207+
docs.0._source:
208+
keyword: "the Quick Brown Fox jumps over the lazy Dog"
209+
keyword_with_ignore_above: "the Quick Brown Fox jumps over the lazy Dog"
210+
keyword_without_doc_values: "the Quick Brown Fox jumps over the lazy Dog"
211+
212+
- match: { docs.1._index: "test-keyword-with-normalizer" }
213+
- match: { docs.1._id: "2" }
214+
- match:
215+
docs.1._source:
216+
keyword: "The five BOXING wizards jump Quickly"
217+
keyword_with_ignore_above: "The five BOXING wizards jump Quickly"
218+
keyword_without_doc_values: "The five BOXING wizards jump Quickly"
219+
220+
- match: { docs.2._index: "test-keyword-with-normalizer" }
221+
- match: { docs.2._id: "3" }
222+
- match:
223+
docs.2._source:
224+
keyword: [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
225+
keyword_with_ignore_above: [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
226+
keyword_without_doc_values: [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
227+
141228
---
142229
stored text:
143230
- requires:

0 commit comments

Comments
 (0)