Hey,
the responses I get from Elastisearch are rather huge. I've found out that it is possible to remove data of responses by using response filtering:
Is there any way to put the filter inside a POST body so that I could use in a query like this:
window.fetch(Config.serverUrl, {
method: 'POST',
mode: 'cors',
body: JSON.stringify({
'query': {
'bool': {
'should': [
{
'match': {
'type': 'GatewayClosed'
}
}, {
'match': {
'type': 'GatewayStarted'
}
}
]
}
},
"size": 0,
"aggregations": {
"Gateways": {
"terms": {
"field": "source.keyword",
"size": 10000
},
"aggs": {
"Information": {
"top_hits": {
"sort": [
{
"@timestamp": {
"order": "desc"
}
}
],
"_source": {
"includes": ["source", "timestamp", "type"]
},
"size": 1
}
}
}
}
}
}
)