GET /work_order_olap/_search
{
"size": 0,
"query": {
"bool": {
"must": [{"range":{"plan_begin_date":{"gte":"2016-04-01","lte":"2020-04-30"}}},{"term":{"repair_type":"repair_maintenance"}},{"terms":{"train_no":["2641"]}},{"terms":{"fault_object_1":["供风及制动系统"]}},{"term":{"repair_place":"委外修"}}]
}
},
"aggs": {
"total": {
"cardinality": {
"script": "doc['material_no']+ '-' + doc['material_name'] + '-' + doc['material_category']"
}
}
}
}