Hi,
I have a question about the number of result by aggregations, for every aggregations I have always not more than 10 results.
Following the request anthe results.
Request:
{
"from" : 0,
"size": 15,
"query": {
"match": {
"doc.full_text_search": {
"query": "accompagnato como stefano",
"operator": "or"
}
}
},
"aggs": {
"group_by_anno": {
"terms": {
"field": "doc.uscita.anno"
}
},
"group_by_testata": {
"terms": {
"field": "doc.testata.sigla"
}
},
"group_by_categoria": {
"terms": {
"field": "doc.categoria.nome"
}
},
"group_by_comune": {
"terms": {
"field": "doc.luogo.comune.nome"
}
}
}
}
Result:
{
"took": 505,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 25946,
"max_score": 10.722082,
"hits": [
{
"_index": "netweek",
"_type": "articolo_mapped",
"_id": "3816612",
"_score": 10.722082,
"_source": {
"doc": {
"art_id": "3816612",
...................................................
}
.....................................................
]
},
"aggregations": {
"group_by_testata": {
"doc_count_error_upper_bound": 61,
"sum_other_doc_count": 15862,
"buckets": [
{
"key": "GDL",
"doc_count": 1377
},
{
"key": "GDE",
"doc_count": 1148
},
{
"key": "GOC",
"doc_count": 1094
},
{
"key": "SA7",
"doc_count": 1074
},
{
"key": "GDS",
"doc_count": 1055
},
{
"key": "VAL",
"doc_count": 990
},
{
"key": "GDU",
"doc_count": 867
},
{
"key": "GDO",
"doc_count": 860
},
{
"key": "NOB",
"doc_count": 827
},
{
"key": "PBI",
"doc_count": 792
}
]
},
"group_by_anno": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": 2015,
"doc_count": 12509
},
{
"key": 2016,
"doc_count": 7584
},
{
"key": 2014,
"doc_count": 5853
}
]
},
"group_by_comune": {
"doc_count_error_upper_bound": 91,
"sum_other_doc_count": 20022,
"buckets": [
{
"key": "Como",
"doc_count": 1208
},
{
"key": "Lecco",
"doc_count": 688
},
{
"key": "Erba",
"doc_count": 594
},
{
"key": "Biella",
"doc_count": 577
},
{
"key": "Aosta",
"doc_count": 568
},
{
"key": "Rho",
"doc_count": 507
},
{
"key": "Vercelli",
"doc_count": 492
},
{
"key": "Seregno",
"doc_count": 438
},
{
"key": "Monza",
"doc_count": 429
},
{
"key": "Olgiate Comasco",
"doc_count": 423
}
]
},
"group_by_categoria": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 2835,
"buckets": [
{
"key": "Cronaca",
"doc_count": 8058
},
{
"key": "Tempo Libero e Cultura",
"doc_count": 5002
},
{
"key": "Politica e amministrativa",
"doc_count": 2749
},
{
"key": "Sport - Calcio",
"doc_count": 2437
},
{
"key": "Cronaca Nera e Giudiziaria",
"doc_count": 1584
},
{
"key": "Sport - ..altri sport",
"doc_count": 1021
},
{
"key": "Sport - Basket",
"doc_count": 647
},
{
"key": "Lavoro Economia",
"doc_count": 544
},
{
"key": "Sport",
"doc_count": 544
},
{
"key": "Scuola",
"doc_count": 525
}
]
}
}
}