Elasticsearch: Implement processing of logs query results in backend (#63647)
* Elasticsearch: Add processing of logs query to backend * Add and fix tests * Add snapshot tests * Fix test in ES client * Small updates, remove redundant logic * Refactor setPreferredVisType to improve readability
This commit is contained in:
@@ -0,0 +1,208 @@
|
||||
{
|
||||
"took": 6,
|
||||
"responses": [
|
||||
{
|
||||
"took": 6,
|
||||
"timed_out": false,
|
||||
"_shards": {
|
||||
"total": 1,
|
||||
"successful": 1,
|
||||
"skipped": 0,
|
||||
"failed": 0
|
||||
},
|
||||
"hits": {
|
||||
"total": {
|
||||
"value": 81,
|
||||
"relation": "eq"
|
||||
},
|
||||
"max_score": null,
|
||||
"hits": [
|
||||
{
|
||||
"_index": "logs-2023.02.09",
|
||||
"_id": "g2aeNoYB7vaC3bq-ezfK",
|
||||
"_score": null,
|
||||
"_source": {
|
||||
"abc": null,
|
||||
"is_true": true,
|
||||
"testtime": "2023-02-09T14:40:01.475Z",
|
||||
"line": "log text [106619125]",
|
||||
"counter": 81,
|
||||
"float": 10.911972180833306,
|
||||
"label": "val3",
|
||||
"lvl": "info",
|
||||
"location": "-42.73465234425797, -14.097854057104112",
|
||||
"shapes": [
|
||||
{
|
||||
"type": "triangle"
|
||||
},
|
||||
{
|
||||
"type": "triangle"
|
||||
},
|
||||
{
|
||||
"type": "triangle"
|
||||
},
|
||||
{
|
||||
"type": "square"
|
||||
}
|
||||
],
|
||||
"nested_field": {
|
||||
"internal": {
|
||||
"nested": "value1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sort": [
|
||||
1675953601475,
|
||||
4
|
||||
]
|
||||
},
|
||||
{
|
||||
"_index": "logs-2023.02.09",
|
||||
"_id": "gmaeNoYB7vaC3bq-eDcN",
|
||||
"_score": null,
|
||||
"_source": {
|
||||
"abc": null,
|
||||
"is_true": false,
|
||||
"testtime": "2023-02-09T14:40:00.513Z",
|
||||
"line": "log text with [781660944]",
|
||||
"counter": 80,
|
||||
"float": 62.94120607636795,
|
||||
"label": "val3",
|
||||
"lvl": "error",
|
||||
"location": "42.07571917624318, 15.95725088484611",
|
||||
"shapes": [
|
||||
{
|
||||
"type": "triangle"
|
||||
},
|
||||
{
|
||||
"type": "square"
|
||||
}
|
||||
],
|
||||
"nested_field": {
|
||||
"internal": {
|
||||
"nested": "value2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sort": [
|
||||
1675953600513,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"_index": "logs-2023.02.09",
|
||||
"_id": "gWaeNoYB7vaC3bq-dDdL",
|
||||
"_score": null,
|
||||
"_source": {
|
||||
"abc": "def",
|
||||
"is_true": true,
|
||||
"testtime": "2023-02-09T14:39:59.556Z",
|
||||
"line": "log text [894867430]",
|
||||
"counter": 79,
|
||||
"float": 53.323706427230455,
|
||||
"label": "val1",
|
||||
"lvl": "info",
|
||||
"location": "-38.27341566189766, -23.66739642570781",
|
||||
"shapes": [
|
||||
{
|
||||
"type": "triangle"
|
||||
},
|
||||
{
|
||||
"type": "square"
|
||||
}
|
||||
],
|
||||
"nested_field": {
|
||||
"internal": {
|
||||
"nested": "value3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sort": [
|
||||
1675953599556,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"_index": "logs-2023.02.09",
|
||||
"_id": "gGaeNoYB7vaC3bq-cDeY",
|
||||
"_score": null,
|
||||
"_source": {
|
||||
"abc": "def",
|
||||
"is_true": false,
|
||||
"testtime": "2023-02-09T14:39:58.608Z",
|
||||
"line": "log text [478598889]",
|
||||
"counter": 78,
|
||||
"float": 82.72012623471589,
|
||||
"label": "val1",
|
||||
"lvl": "info",
|
||||
"location": "12.373240290451287, 43.265493464362024",
|
||||
"shapes": [
|
||||
{
|
||||
"type": "triangle"
|
||||
},
|
||||
{
|
||||
"type": "triangle"
|
||||
},
|
||||
{
|
||||
"type": "triangle"
|
||||
},
|
||||
{
|
||||
"type": "square"
|
||||
}
|
||||
],
|
||||
"nested_field": {
|
||||
"internal": {
|
||||
"nested": "value4"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sort": [
|
||||
1675953598608,
|
||||
15
|
||||
]
|
||||
},
|
||||
{
|
||||
"_index": "logs-2023.02.09",
|
||||
"_id": "f2aeNoYB7vaC3bq-bDf7",
|
||||
"_score": null,
|
||||
"_source": {
|
||||
"abc": "def",
|
||||
"is_true": false,
|
||||
"testtime": "2023-02-09T14:39:57.665Z",
|
||||
"line": "log text [526995818]",
|
||||
"counter": 77,
|
||||
"float": 35.05784443331803,
|
||||
"label": "val3",
|
||||
"lvl": "info",
|
||||
"location": "-31.524344042228194, -32.11254790120572",
|
||||
"shapes": [
|
||||
{
|
||||
"type": "triangle"
|
||||
},
|
||||
{
|
||||
"type": "triangle"
|
||||
},
|
||||
{
|
||||
"type": "triangle"
|
||||
},
|
||||
{
|
||||
"type": "square"
|
||||
}
|
||||
],
|
||||
"nested_field": {
|
||||
"internal": {
|
||||
"nested": "value5"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sort": [
|
||||
1675953597665,
|
||||
20
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": 200
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user