0
Für das Beispiel in SQL select count (*), x, y von abc Gruppe von x, yWie lade Felder zusammen mit Aggregatfunktion in elasticsearch 5.1 (mit Curl)?
Ich möchte die gleiche Sache in curl
Für das Beispiel in SQL select count (*), x, y von abc Gruppe von x, yWie lade Felder zusammen mit Aggregatfunktion in elasticsearch 5.1 (mit Curl)?
Ich möchte die gleiche Sache in curl
Sie Aggregationen dafür verwenden können, wie folgt aus:
curl -XPOST localhost:9200/abc -d '{
"_source": ["x", "y"],
"aggs": {
"group_by_x" : {
"terms": {
"field": "x"
},
"aggs": {
"group_by_y": {
"terms": {
"field": "y"
}
}
}
}
}
}'
' "aggs": { "count": { "value_count": { "Feld": "DestinationIP.keyword" }, "aggs": { "group_by_x": { „Begriffe ": { "Feld": "sourceIP.keyword" }, "aggs": { "group_by_y": { "Begriffe": { "Feld": "sourcePORT.keyword" } } } } } } 'Gruppe von funktioniert ordnungsgemäß, aber mit count es wirft einen Fehler –
Das' count (*) 'Aggregat ist pro' x' und per 'y', so dass Sie mit meiner Abfrage erhalten – Val
was ist, wenn es min oder Max oder Summe? –