curl 模拟post请求
后面 >>aa.txt是将输出重定向,也可以不写
curl -H "Content-Type:application/json" -X POST --data '{"invoice_id":"051","bill_number":"1","doc_total":12,"file_dir":"/nfsc/EIS_CORE/ESG-TPI-CORE/BB01","remark":"","ext1":"","ext2":"","sys_code":"test_code"}' http://10.202.23.21:8880/bdpapp/invoicePath/path >>aa.txt
script 修改keyword
curl -L -X POST 'http://10.10.1.4:9200/index_name/_update_by_query?conflicts=abort' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": {
"term": {
"key1": {
"value": "123"
}
}
},
"script": {
"inline": "ctx._source['\''last_tm'\''] = '\''2023-10-20 14:48:45.445'\''"
}
}'
curl -L -X POST 'http://10.10.1.4:9200/index_name/_update_by_query?conflicts=abort' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": {
"term": {
"key1": {
"value": "123"
}
}
},
"script": {
"inline": "ctx._source['\''last_tm'\''] = \"2023-10-20 14:48:45.445\""
}
}'