POST /inv_stock_detail/_update_by_query
{
"query": {
"wildcard": {
"goodsClassCode": {
"value": "* "
}
}
},
"script": {
"lang": "painless",
"source": "ctx._source.goodsClassCode=ctx._source.goodsClassCode.trim()"
}
}