本人使用的ElasticSearch7.3
官方文档坑得要命
好多demo拿下来根本没法用
每个demo创建完索引(index)再创建文档模板(mapping)的时候都报错
这边网上查到的资料有的说因为ElasticSearch移除了type
需要添加 ‘include_type_name’ => true
经测试,纯属扯淡!!!
ElasticSearch-PHP踩过的坑
通过排查log日志发现,log中报“No handler for type [string] declared on field [profile]”的错误
ElasticSearch-PHP踩过的坑
最后再查阅资料得到真正的错误原因:创建mapping时index的类型必须为布尔型,type中不再使用string类型
ElasticSearch-PHP踩过的坑
es官方demo中还在使用string类型,寡人简直无力吐槽

相关文章:

  • 2021-12-29
  • 2021-11-11
  • 2021-08-13
  • 2021-08-17
  • 2021-12-10
  • 2021-06-06
  • 2021-06-17
  • 2021-07-07
猜你喜欢
  • 2021-11-29
  • 2022-12-23
  • 2021-07-26
  • 2022-01-23
  • 2022-12-23
  • 2021-10-10
  • 2021-12-20
相关资源
相似解决方案