Skip to content

Commit 906ca11

Browse files
committed
removed wrong yaml test
1 parent cd2f9aa commit 906ca11

File tree

2 files changed

+76
-47
lines changed

2 files changed

+76
-47
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
simple:
2+
- do:
3+
indices.create:
4+
index: test
5+
body:
6+
settings:
7+
index:
8+
mapping.source.mode: synthetic
9+
mappings:
10+
properties:
11+
id:
12+
type: integer
13+
message:
14+
type: patterned_text
15+
16+
- do:
17+
bulk:
18+
index: test
19+
refresh: true
20+
body:
21+
- '{ "create": { } }'
22+
- '{ "id": 1, "message": "some log message with no arg" }'
23+
- '{ "create": { } }'
24+
- '{ "id": 2, "message": "another log message with arg 1234 and arg 5678 and a mixed one ABCD9" }'
25+
- '{ "create": { } }'
26+
- '{ "id": 3, "message": "some log message with no arg" }'
27+
- '{ "create": { } }'
28+
- '{ "id": 4, "message": "another log message with arg 1234 and arg 8765 and a mixed one ABCD1" }'
29+
30+
- do:
31+
search:
32+
index: test
33+
sort: id
34+
35+
- match: { hits.hits.0._source.message: "some log message with no arg" }
36+
- match: { hits.hits.1._source.message: "another log message with arg 1234 and arg 5678 and a mixed one ABCD9" }
37+
- match: { hits.hits.2._source.message: "some log message with no arg" }
38+
- match: { hits.hits.3._source.message: "another log message with arg 1234 and arg 8765 and a mixed one ABCD1" }
39+
40+
---
41+
synthetic_source with copy_to:
42+
43+
- do:
44+
indices.create:
45+
index: synthetic_source_test
46+
body:
47+
settings:
48+
index:
49+
mapping.source.mode: synthetic
50+
mappings:
51+
properties:
52+
foo:
53+
type: patterned_text
54+
copy_to: copy
55+
copy:
56+
type: keyword
57+
58+
- do:
59+
index:
60+
index: synthetic_source_test
61+
id: "1"
62+
refresh: true
63+
body:
64+
foo: "another log message with arg 1234 and arg 5678 and a mixed one ABCD9"
65+
66+
- do:
67+
search:
68+
index: synthetic_source_test
69+
body:
70+
fields: ["copy"]
71+
72+
- match: { "hits.total.value": 1 }
73+
- match:
74+
hits.hits.0._source.foo: "another log message with arg 1234 and arg 5678 and a mixed one ABCD9"
75+
- match:
76+
hits.hits.0.fields.copy.0: "another log message with arg 1234 and arg 5678 and a mixed one ABCD9"

x-pack/plugin/mapper-patterned-text/src/yamlRestTest/resources/rest-api-spec/test/30_sort.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)