Skip to content

Commit b0dd6e4

Browse files
committed
Use type-less template in 8.0 snapshot testing
1 parent 2366ab3 commit b0dd6e4

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"index_patterns": [ "logstash-*" ],
3+
"version": 123,
4+
"settings": {
5+
"index": {
6+
"refresh_interval": "5s",
7+
"analysis": {
8+
"analyzer": {
9+
"default": {
10+
"type": "standard",
11+
"stopwords": "_none_"
12+
}
13+
}
14+
}
15+
}
16+
},
17+
"mappings": {
18+
"dynamic_templates": [
19+
{
20+
"string_fields": {
21+
"match": "*",
22+
"match_mapping_type": "string",
23+
"mapping": {
24+
"type": "multi_field",
25+
"fields": {
26+
"{name}": {
27+
"type": "text",
28+
"index": "analyzed",
29+
"omit_norms": true
30+
},
31+
"raw": {
32+
"type ": "text",
33+
"index": "not_analyzed",
34+
"ignore_above": 256
35+
}
36+
}
37+
}
38+
}
39+
}
40+
],
41+
"properties": {
42+
"@version": {
43+
"type": "text",
44+
"index": false
45+
},
46+
"geoip": {
47+
"type": "object",
48+
"dynamic": true,
49+
"properties": {
50+
"location": {
51+
"type": "geo_point"
52+
}
53+
}
54+
}
55+
}
56+
}
57+
}

spec/spec_helper_acceptance.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def f
2929
v[:elasticsearch_package] = {}
3030
v[:template] = if v[:elasticsearch_major_version] < 6
3131
JSON.load(File.new('spec/fixtures/templates/pre_6.0.json'))
32+
elsif v[:elasticsearch_major_version] >= 8
33+
JSON.load(File.new('spec/fixtures/templates/post_8.0.json'))
3234
else
3335
JSON.load(File.new('spec/fixtures/templates/post_6.0.json'))
3436
end

0 commit comments

Comments
 (0)