es排序搜索时异常org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed

已解决!!!org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed

问题分析

SearchPhaseExecutionException搜索阶段执行异常,查看当时搜索时是想根据时间进行排序,然后发生异常!

然后在Kibana查看映射发现updateTime的类型为text,是因为在映射时updateTime类型为String,默认分词;所以排序时无法精确找到对应的updataTime

已解决!!!org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed

解决

由于最初映射为String,所以es中默认是text类型;现在设置updateTime类型为keyword;即在设置排序时将排序字段updateTime手动设为keyword类型;

已解决!!!org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed

相关文章:

  • 2021-10-15
  • 2022-02-18
  • 2021-09-02
  • 2021-06-03
  • 2022-01-22
  • 2021-08-24
  • 2021-07-12
  • 2021-09-05
猜你喜欢
  • 2021-08-15
  • 2022-12-23
  • 2021-11-13
  • 2021-11-04
  • 2021-06-30
  • 2022-12-23
  • 2021-09-23
相关资源
相似解决方案