java.lang.RuntimeException: org.springframework.data.elasticsearch.RestStatusException: Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]; nested exception is ElasticsearchStatusException[Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Field [tags] is not a completion suggest field]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Field [tags] is not a completion suggest field]];
RestStatusException{status=400} org.springframework.data.elasticsearch.RestStatusException: Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]; nested exception is ElasticsearchStatusException[Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Field [tags] is not a completion suggest field]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Field [tags] is not a completion suggest field]];
Caused by: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Field [tags] is not a completion suggest field]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Field [tags] is not a completion suggest field]];

老师,启动之后搜索补齐关键字,发现底下没有关键词出来,然后看了一下日志发现报错信息是指定的字段(Field)"tags"不是一个完整的建议字段。 但我对比了下视频里的代码发现都是一样的,而且向ES同步商品数据是成功的,不知道怎么解决了

image.png

相关课程:JAVA 全系列>第十八阶段:亿级高并发电商项目>亿级高并发电商项目(旧)>商品搜索_编写补齐关键字功能(2)

©2014-2023 百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备13018289号-12    营业执照    经营许可证:京B2-20212637