Skip to content

Commit 0200d61

Browse files
authored
Merge pull request #1376 from metacpan/haarg/es7-compat
update mappings to be compatible with elasticsearch 7
2 parents 946ffd2 + e783c2b commit 0200d61

40 files changed

+348
-1049
lines changed

cpanfile

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ requires 'Scalar::Util', '1.62'; # Moose
122122
requires 'Search::Elasticsearch' => '8.12';
123123
requires 'Search::Elasticsearch::Client::2_0' => '6.81';
124124
requires 'Search::Elasticsearch::Client::5_0' => '6.81';
125+
requires 'Search::Elasticsearch::Client::7_0' => '8.12';
125126
requires 'Throwable::Error';
126127
requires 'Term::Size::Any'; # for Catalyst
127128
requires 'Text::CSV_XS';

es/account/mapping.json

+6-18
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,27 @@
55
"dynamic": true,
66
"properties": {
77
"client": {
8-
"ignore_above": 2048,
9-
"index": "not_analyzed",
10-
"type": "string"
8+
"type": "keyword"
119
},
1210
"token": {
13-
"ignore_above": 2048,
14-
"index": "not_analyzed",
15-
"type": "string"
11+
"type": "keyword"
1612
}
1713
}
1814
},
1915
"code": {
20-
"ignore_above": 2048,
21-
"index": "not_analyzed",
22-
"type": "string"
16+
"type": "keyword"
2317
},
2418
"id": {
25-
"ignore_above": 2048,
26-
"index": "not_analyzed",
27-
"type": "string"
19+
"type": "keyword"
2820
},
2921
"identity": {
3022
"dynamic": false,
3123
"properties": {
3224
"key": {
33-
"ignore_above": 2048,
34-
"index": "not_analyzed",
35-
"type": "string"
25+
"type": "keyword"
3626
},
3727
"name": {
38-
"ignore_above": 2048,
39-
"index": "not_analyzed",
40-
"type": "string"
28+
"type": "keyword"
4129
}
4230
}
4331
}

es/account/settings.json

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
2-
"mapper": {
3-
"dynamic": "false"
4-
},
52
"number_of_replicas": 1,
63
"number_of_shards": 1,
74
"refresh_interval": "1s"

es/author/mapping.json

+24-66
Original file line numberDiff line numberDiff line change
@@ -5,66 +5,46 @@
55
"fields": {
66
"analyzed": {
77
"analyzer": "standard",
8-
"fielddata": {
9-
"format": "disabled"
10-
},
8+
"fielddata": false,
119
"store": true,
12-
"type": "string"
10+
"type": "text"
1311
}
1412
},
15-
"ignore_above": 2048,
16-
"index": "not_analyzed",
17-
"type": "string"
13+
"type": "keyword"
1814
},
1915
"blog": {
2016
"dynamic": true,
2117
"properties": {
2218
"feed": {
23-
"ignore_above": 2048,
24-
"index": "not_analyzed",
25-
"type": "string"
19+
"type": "keyword"
2620
},
2721
"url": {
28-
"ignore_above": 2048,
29-
"index": "not_analyzed",
30-
"type": "string"
22+
"type": "keyword"
3123
}
3224
}
3325
},
3426
"city": {
35-
"ignore_above": 2048,
36-
"index": "not_analyzed",
37-
"type": "string"
27+
"type": "keyword"
3828
},
3929
"country": {
40-
"ignore_above": 2048,
41-
"index": "not_analyzed",
42-
"type": "string"
30+
"type": "keyword"
4331
},
4432
"donation": {
4533
"dynamic": true,
4634
"properties": {
4735
"id": {
48-
"ignore_above": 2048,
49-
"index": "not_analyzed",
50-
"type": "string"
36+
"type": "keyword"
5137
},
5238
"name": {
53-
"ignore_above": 2048,
54-
"index": "not_analyzed",
55-
"type": "string"
39+
"type": "keyword"
5640
}
5741
}
5842
},
5943
"email": {
60-
"ignore_above": 2048,
61-
"index": "not_analyzed",
62-
"type": "string"
44+
"type": "keyword"
6345
},
6446
"gravatar_url": {
65-
"ignore_above": 2048,
66-
"index": "not_analyzed",
67-
"type": "string"
47+
"type": "keyword"
6848
},
6949
"is_pause_custodial_account": {
7050
"type": "boolean"
@@ -76,34 +56,24 @@
7656
"fields": {
7757
"analyzed": {
7858
"analyzer": "standard",
79-
"fielddata": {
80-
"format": "disabled"
81-
},
59+
"fielddata": false,
8260
"store": true,
83-
"type": "string"
61+
"type": "text"
8462
}
8563
},
86-
"ignore_above": 2048,
87-
"index": "not_analyzed",
88-
"type": "string"
64+
"type": "keyword"
8965
},
9066
"pauseid": {
91-
"ignore_above": 2048,
92-
"index": "not_analyzed",
93-
"type": "string"
67+
"type": "keyword"
9468
},
9569
"perlmongers": {
9670
"dynamic": true,
9771
"properties": {
9872
"name": {
99-
"ignore_above": 2048,
100-
"index": "not_analyzed",
101-
"type": "string"
73+
"type": "keyword"
10274
},
10375
"url": {
104-
"ignore_above": 2048,
105-
"index": "not_analyzed",
106-
"type": "string"
76+
"type": "keyword"
10777
}
10878
}
10979
},
@@ -115,43 +85,31 @@
11585
"fields": {
11686
"analyzed": {
11787
"analyzer": "simple",
118-
"fielddata": {
119-
"format": "disabled"
120-
},
88+
"fielddata": false,
12189
"store": true,
122-
"type": "string"
90+
"type": "text"
12391
}
12492
},
125-
"ignore_above": 2048,
126-
"index": "not_analyzed",
127-
"type": "string"
93+
"type": "keyword"
12894
},
12995
"name": {
130-
"ignore_above": 2048,
131-
"index": "not_analyzed",
132-
"type": "string"
96+
"type": "keyword"
13397
}
13498
},
13599
"type": "nested"
136100
},
137101
"region": {
138-
"ignore_above": 2048,
139-
"index": "not_analyzed",
140-
"type": "string"
102+
"type": "keyword"
141103
},
142104
"updated": {
143105
"format": "strict_date_optional_time||epoch_millis",
144106
"type": "date"
145107
},
146108
"user": {
147-
"ignore_above": 2048,
148-
"index": "not_analyzed",
149-
"type": "string"
109+
"type": "keyword"
150110
},
151111
"website": {
152-
"ignore_above": 2048,
153-
"index": "not_analyzed",
154-
"type": "string"
112+
"type": "keyword"
155113
}
156114
}
157115
}

es/author/settings.json

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
2-
"mapper": {
3-
"dynamic": "false"
4-
},
52
"number_of_replicas": 1,
63
"number_of_shards": 1,
74
"refresh_interval": "1s"

es/contributor/mapping.json

+8-20
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,22 @@
22
"dynamic": false,
33
"properties": {
44
"distribution": {
5-
"ignore_above": 2048,
6-
"index": "not_analyzed",
7-
"type": "string"
5+
"type": "keyword"
86
},
9-
"pauseid": {
10-
"ignore_above": 2048,
11-
"index": "not_analyzed",
12-
"type": "string"
7+
"email": {
8+
"type": "keyword"
139
},
1410
"name": {
15-
"ignore_above": 2048,
16-
"index": "not_analyzed",
17-
"type": "string"
11+
"type": "keyword"
1812
},
19-
"email": {
20-
"ignore_above": 2048,
21-
"index": "not_analyzed",
22-
"type": "string"
13+
"pauseid": {
14+
"type": "keyword"
2315
},
2416
"release_author": {
25-
"ignore_above": 2048,
26-
"index": "not_analyzed",
27-
"type": "string"
17+
"type": "keyword"
2818
},
2919
"release_name": {
30-
"ignore_above": 2048,
31-
"index": "not_analyzed",
32-
"type": "string"
20+
"type": "keyword"
3321
}
3422
}
3523
}

es/contributor/settings.json

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
2-
"mapper": {
3-
"dynamic": "false"
4-
},
52
"number_of_replicas": 1,
63
"number_of_shards": 1,
74
"refresh_interval": "1s"

es/cover/mapping.json

+3-9
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,13 @@
2222
}
2323
},
2424
"distribution": {
25-
"ignore_above": 2048,
26-
"index": "not_analyzed",
27-
"type": "string"
25+
"type": "keyword"
2826
},
2927
"release": {
30-
"ignore_above": 2048,
31-
"index": "not_analyzed",
32-
"type": "string"
28+
"type": "keyword"
3329
},
3430
"version": {
35-
"ignore_above": 2048,
36-
"index": "not_analyzed",
37-
"type": "string"
31+
"type": "keyword"
3832
}
3933
}
4034
}

es/cover/settings.json

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
2-
"mapper": {
3-
"dynamic": "false"
4-
},
52
"number_of_replicas": 1,
63
"number_of_shards": 1,
74
"refresh_interval": "1s"

es/cve/mapping.json

+9-14
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,35 @@
22
"dynamic": false,
33
"properties": {
44
"affected_versions": {
5-
"type": "string"
5+
"type": "text"
66
},
77
"cpansa_id": {
8-
"ignore_above": 2048,
9-
"index": "not_analyzed",
10-
"type": "string"
8+
"type": "keyword"
119
},
1210
"cves": {
13-
"type": "string"
11+
"type": "text"
1412
},
1513
"description": {
16-
"type": "string"
14+
"type": "text"
1715
},
1816
"distribution": {
19-
"index": "not_analyzed",
20-
"type": "string"
17+
"type": "keyword"
2118
},
2219
"references": {
23-
"type": "string"
20+
"type": "text"
2421
},
2522
"releases": {
26-
"index": "not_analyzed",
27-
"type": "string"
23+
"type": "keyword"
2824
},
2925
"reported": {
3026
"format": "strict_date_optional_time||epoch_millis",
3127
"type": "date"
3228
},
3329
"severity": {
34-
"type": "string"
30+
"type": "text"
3531
},
3632
"versions": {
37-
"index": "not_analyzed",
38-
"type": "string"
33+
"type": "keyword"
3934
}
4035
}
4136
}

es/cve/settings.json

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
2-
"mapper": {
3-
"dynamic": "false"
4-
},
52
"number_of_replicas": 1,
63
"number_of_shards": 1,
74
"refresh_interval": "1s"

0 commit comments

Comments
 (0)