您的当前位置:首页正文

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

来源:爱站旅游
导读已解决!!!org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed

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

问题分析

SearchPhaseExecutionException搜索阶段执行异常,查看当时搜索时是想根据时间进行排序,然后发生异常!
然后在Kibana查看映射发现updateTime的类型为text,是因为在映射时updateTime类型为String,默认分词;所以排序时无法精确找到对应的updataTime

解决

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

因篇幅问题不能全部显示,请点此查看更多更全内容

Top