我正在使用完整建议器中的ElasticSearch文档中的一个示例,但我收到一个错误,说payloads: true是一个不受支持的参数。 除非文档错误,否则显然支持哪个? 我有最新的Elasticsearch应用程序安装(5.3.0)。
这是我的cURL:
curl -X PUT localhost:9200/search/pages/_mapping -d '{ "pages" : { "properties": { "title": { "type" : "string" }, "suggest" : { "type" : "completion", "analyzer" : "simple", "search_analyzer" : "simple", "payloads" : true } } } }';而错误:
{ "error" : { "root_cause" : [ { "type" : "mapper_parsing_exception", "reason" : "Mapping definition for [suggest] has unsupported parameters: [payloads : true]" } ], "type" : "mapper_parsing_exception", "reason" : "Mapping definition for [suggest] has unsupported parameters: [payloads : true]" }, "status" : 400 }I am using an example right from ElasticSearch documentation here using the Completion Suggestor but I am getting an error saying payloads: true is an unsupported parameter. Which obviously is supported unless the docs are wrong? I have the latest Elasticsearch app install (5.3.0).
Here is my cURL:
curl -X PUT localhost:9200/search/pages/_mapping -d '{ "pages" : { "properties": { "title": { "type" : "string" }, "suggest" : { "type" : "completion", "analyzer" : "simple", "search_analyzer" : "simple", "payloads" : true } } } }';And the error:
{ "error" : { "root_cause" : [ { "type" : "mapper_parsing_exception", "reason" : "Mapping definition for [suggest] has unsupported parameters: [payloads : true]" } ], "type" : "mapper_parsing_exception", "reason" : "Mapping definition for [suggest] has unsupported parameters: [payloads : true]" }, "status" : 400 }最满意答案
通过以下提交已在ElasticSearch 5.3.0中删除了payload参数: 从完成建议器中删除有效负载选项 。 这是comit消息:
The payload option was introduced with the new completion suggester implementation in v5, as a stop gap solution to return additional metadata with suggestions. Now we can return associated documents with suggestions (#19536) through fetch phase using stored field (_source). The additional fetch phase ensures that we only fetch the _source for the global top-N suggestions instead of fetching _source of top results for each shard.The payloadparameter has been removed in ElasticSearch 5.3.0 by the following commit: Remove payload option from completion suggester . Here is the comit message:
The payload option was introduced with the new completion suggester implementation in v5, as a stop gap solution to return additional metadata with suggestions. Now we can return associated documents with suggestions (#19536) through fetch phase using stored field (_source). The additional fetch phase ensures that we only fetch the _source for the global top-N suggestions instead of fetching _source of top results for each shard.更多推荐
发布评论