我可以看到,对于非批量PUT操作,这个功能是存在的,对于_id
字段,使用“op_type”as explained in the API。
我尝试了这个URL:https://localhost:9200/my_index/_bulk/?op_type=create
个
并且还https://localhost:9200/my_index/_bulk?op_type=create
个
两者都失败了:
"error": {
"reason": "request [/my_index/_bulk/] contains unrecognized parameter: [op_type]",
字符串
有没有什么方法可以做到这一点呢?请求体是批量字符串本身,方法是POST。
1条答案
按热度按时间bcs8qyzn1#
您只需要在
_bulk
中使用create
而不是index
字符串