自动填充建议中的输出字段 [英] Output field in autocomplete suggestion
问题描述
当我想在弹性搜索中索引文档时,嵌套:IllegalArgumentException [未知字段名[输出],必须是[input,weight,contexts]之一];] 消息[MapperParsingException [解析失败];
我知道输出字段从版本5中的弹性搜索中删除,但为什么?为了获得输入的单个结果,我必须做些什么?
弹性提到以下
由于建议是面向文档的,建议元数据(例如输出)现在应该被指定为文档中的一个字段。索引建议条目时指定输出的支持已被删除。现在,建议结果条目的文本始终是建议输入的未分析值(与在5.0之前的索引中建立索引时没有指定输出相同)。
更新
我可以从ES 5.1.1中的多个输入获取单个输出。您可以找到答案 here
when I want to index a document in elasticsearch this problem occurring:
message [MapperParsingException[failed to parse]; nested: IllegalArgumentException[unknown field name [output], must be one of [input, weight, contexts]];]
I know that the output field removed from elasticsearch in version 5 but why? and what I have to do for getting single result for inputs?
Elastic mentions the following
As suggestions are document-oriented, suggestion metadata (e.g. output) should now be specified as a field in the document. The support for specifying output when indexing suggestion entries has been removed. Now suggestion result entry’s text is always the un-analyzed value of the suggestion’s input (same as not specifying output while indexing suggestions in pre-5.0 indices).
Update
I was able to get a single output from multiple inputs in ES 5.1.1. You can find the answere here
这篇关于自动填充建议中的输出字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!