更新索引对应的 mapping
PUT /es/:target/_mapping
请求示例
PUT http://localhost:4080/es/olympics/_mapping
请求体:
{"properties": {"name": {"type": "text","index": true,"store": true,"sortable": false,"aggregatable": false,"highlightable": true},"author": {"type": "keyword","index": true,"store": false,"sortable": true,"aggregatable": true,"highlightable": false},"price": {"type": "numeric","index": true,"store": false,"sortable": true,"aggregatable": true,"highlightable": false},"published": {"type": "bool","index": true,"store": false,"sortable": true,"aggregatable": true,"highlightable": false},"create_at": {"type": "date","format": "2006-01-02T15:04:05Z07:00","index": true,"store": false,"sortable": true,"aggregatable": true,"highlightable": false}}}
mapping 也能在创建索引的时候指定
