根据查询条件删除某些数据
POST patientinfo/_delete_by_query?scroll_size=5000
{
"query": {
"term": {
"dataLevel": {
"value": "2"
}
}
}
}
GET /patientinfo/_analyze
{
"text":"单核细胞HLA-DR",
"tokenizer":"ik_max_word"
}
GET patientinfo/_search
{
"aggs": {
"count":{
"cardinality": {
"field": "empiId"
}
}
}
}
GET patientinfo/_search?_source=patAge
{
"aggs": {
"NAME": {
"terms": {
"field": "patientDiseaseInfo.diseaseName",
"size": 10
},
"aggs": {
"match_p":{
"filter": {
"range": {
"patAge": {
"gte": 10,
"lte": 20
}
}
}
},
"match_percent": {
"bucket_script": {
"buckets_path": {
"totalCount":"_count",
"matchCount":"match_p._count"
},
"script": "params.matchCount/params.totalCount * 100"
}
}
}
}
},
"from": 0,
"size": 1
}