es内增加字段
先删除样板
curl -XDELETE trusfort2:9200/_template/default_template
获取模板
curl -XGET trusfort2:9200/_template/default_template
然后将新增的字段加入样板,注意类型
curl -XPUT http://192.168.1.113:9200/_template/default_template -d ‘json串’
query
{
"query": {
"bool": {
"filter": {
"match": {
"appid": {
"query": "1",
"type": "boolean"
}
}
}
}
}
}
{"query":{
"bool": {
"must": { "match": { "opId": "aae7183b79044031a2068cea8c7242ab" }}
}
}}