使用netstat -lntp来看看有侦听在网络某端口的进程。当然,也可以使用 lsof。

python操作es使用bulk时候报content-type(406)错误

Elasticsearch | 作者 yaok | 发布于2018年08月29日 | 阅读数:5753

elasticsearch.exceptions.TransportError: TransportError(406, u'Content-Type header is not supported')
已邀请:

JackGe

赞同来自: yaok

可以看下https://elasticsearch-py.readt ... lpers
def bulk(self, body, index=None, doc_type=None, params=None):
return self.transport.perform_request('POST', _make_path(index,
            doc_type, '_bulk'), params=params, body=self._bulk_body(body),
            headers={'content-type': 'application/x-ndjson'})
 

要回复问题请先登录注册