📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 7.16-8.9

简而言之,当您尝试在不支持"短语"建议器的字段上使用它时,就会出现此错误。“短语"建议器用于文本字段,因此如果字段是其他类型(如整数或日期),您将收到此错误。要解决此问题,如果适合的话,您可以将字段类型更改为文本,或者使用与字段类型兼容的其他建议器。或者,您可以创建一个新的文本字段,其中包含当前字段值的字符串表示形式,并在其上使用"短语"建议器。

日志上下文 #

日志 “suggester[phrase] doesn’t support field [” + currentFieldName + “]” 的类名是 PhraseSuggestionBuilder.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人使用:

parser.getTokenLocation();
 "suggester[phrase]  doesn't support array field [" + currentFieldName + "]"
 );
 }
 } else {
 throw new ParsingException(parser.getTokenLocation(); "suggester[phrase] doesn't support field [" + currentFieldName + "]");
 }
 }  // now we should have field name; check and copy fields over to the suggestion builder we return
 if (fieldname == null) {