代码之家  ›  专栏  ›  技术社区  ›  user3576036

Searchkick::在尝试重新索引时导入错误

  •  0
  • user3576036  · 技术社区  · 6 年前

    我正在尝试在rails应用程序上实现elasticsearch searchkick 作为包装。

    文章 uuid title

    我补充说 搜索踢 文章模型。

    现在当我想跑的时候 Model.reindex 如searchkick文档中所述:

    Article.reindex 从rails控制台

    {"count":93,"exception":["Searchkick::ImportError","{\"type\"=\u003e\"mapper_parsing_exception\", \"reason\"=\u003e\"failed to find type parsed [keyword] for [title]\"} on item with id '003566ec-3952-4d26-ba99-f568367f174b'"],"exception_object":"{\"type\"=\u003e\"mapper_parsing_exception\", \"reason\"=\u003e\"failed to find type parsed [keyword] for [title]\"} on item with id '003566ec-3952-4d26-ba99-f568367f174b'"} Searchkick::ImportError: {"type"=>"mapper_parsing_exception", "reason"=>"failed to find type parsed [keyword] for [title]"} on item with id '003566ec-3952-4d26-ba99-f568367f174b'

    是的,elasticsearch服务已经启动并运行。

    1 回复  |  直到 6 年前
        1
  •  2
  •   Pierre Mallet    6 年前

    我认为您使用的是2.X Elasticsearch集群,而您的searchKick版本预期为5.X+(其中引入了类型文本和关键字)

    你是从哪里查到的 searchkick readme

    最新版本适用于Elasticsearch 5和6。用于Elasticsearch 2、使用2.5.0版和本自述文件。