-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpipeline.json
38 lines (38 loc) · 1.22 KB
/
pipeline.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"description": "Pipeline for speedtest docs"
,"processors": [
{
"script": {
"lang": "painless"
,"source":
"""
if (ctx.server != null) {
if (ctx.server.lat != null && ctx.server.lon != null) {
ctx.server["geo"] = [Double.parseDouble(ctx.server.lat), Double.parseDouble(ctx.server.lon)];
}
ctx.server.remove("cc");
ctx.server.remove("d");
ctx.server.remove("id");
ctx.server.remove("host");
ctx.server.remove("latency");
ctx.server.remove("lat");
ctx.server.remove("lon");
}
ctx.remove("share");
if (ctx.client != null) {
if (ctx.client.lat != null && ctx.client.lon != null) {
ctx.client["geo"] = [Double.parseDouble(ctx.client.lat), Double.parseDouble(ctx.client.lon)];
}
ctx.client.remove("isprating");
ctx.client.remove("rating");
ctx.client.remove("ispdlavg");
ctx.client.remove("ispulavg");
ctx.client.remove("loggedin");
ctx.client.remove("lat");
ctx.client.remove("lon");
}
"""
}
}
]
}