lotus/tools/kibana/index-template.json
2021-09-29 16:21:16 +02:00

67 lines
1.8 KiB
JSON

{
"template": {
"settings": {},
"mappings": {
"runtime": {
"peerScore.weightedScore": {
"type": "double",
"script": {
"source": "if (doc['type'].value == 100) {\n def score = doc['peerScore.score'].value;\n if (doc['sourceAuth'] == \"<password>\") {\n\n emit(score * 1.2)\n } else {\n emit(score)\n }\n}\n",
"lang": "painless"
}
}
},
"properties": {
"peerScore": {
"properties": {
"appSpecificScore": {
"type": "double"
},
"behaviourPenalty": {
"type": "double"
},
"ipColocationFactor": {
"type": "double"
},
"score": {
"type": "double"
},
"topics": {
"type": "nested",
"properties": {
"firstMessageDeliveries": {
"type": "double",
"ignore_malformed": false,
"coerce": true
},
"invalidMessageDeliveries": {
"type": "double",
"ignore_malformed": false,
"coerce": true
},
"meshMessageDeliveries": {
"type": "double",
"ignore_malformed": false,
"coerce": true
},
"timeInMesh": {
"type": "double",
"ignore_malformed": false,
"coerce": true
},
"topic": {
"type": "keyword"
}
}
}
}
},
"sourceAuth": {
"type": "keyword"
}
}
},
"aliases": {}
}
}