问与答 elasticsearch 创建 map 时报 analyzer [ik_max_word] not found for field [title] 错误,是什么原因?

tyzhe · 2019-01-23 09:34:28 · 热度: 4.4k

错误代码如下:

[root@centos7 php 7 elasticsearch-6.4.2]# ./bin/elasticsearch -d
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[root@centos7php7 elasticsearch-6.4.2]# /usr/local/bin/python2.7 /home/wwwroot/python_script/elasticsearch/index.py
Traceback (most recent call last):
  File "/home/wwwroot/python_script/elasticsearch/index.py", line 79, in <module>
    obj.Create_Index()
  File "/home/wwwroot/python_script/elasticsearch/index.py", line 63, in Create_Index
    res = self.es.indices.create(index=self.index_name, body=_index_mappings)
  File "/usr/local/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 76, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/elasticsearch/client/indices.py", line 88, in create
    params=params, body=body)
  File "/usr/local/lib/python2.7/site-packages/elasticsearch/transport.py", line 318, in perform_request
    status, headers_response, data = connection.perform_request(method, url, params, body, headers=headers, ignore=ignore, timeout=timeout)
  File "/usr/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 186, in perform_request
    self._raise_error(response.status, raw_data)
  File "/usr/local/lib/python2.7/site-packages/elasticsearch/connection/base.py", line 125, in _raise_error
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.RequestError: RequestError(400, u'mapper_parsing_exception', u'analyzer [ik_max_word] not found for field [title]')

猜你喜欢:
暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册