Amazon dynamodb DynamoDB表格-->;CloudSearch==字段";l";域配置中不存在

Amazon dynamodb DynamoDB表格-->;CloudSearch==字段";l";域配置中不存在,amazon-dynamodb,amazon-cloudsearch,Amazon Dynamodb,Amazon Cloudsearch,摘要 我有一个DynamoDB表,其中包含不到十个项目,我正在尝试使用CloudSearch对其进行索引。CloudSearch索引器建议一个名为“l”的不存在属性。这似乎源于dynamodbjson“list”键(在我的例子中,它存储列表对象的数组,即所有字符串)。无论如何,即使在索引字段配置时删除此键,在文档上载时仍会出现以下硬错误: {["Field "l" does not exist in domain configuration (near operation with index

摘要

我有一个DynamoDB表,其中包含不到十个项目,我正在尝试使用CloudSearch对其进行索引。CloudSearch索引器建议一个名为
“l”
的不存在属性。这似乎源于dynamodbjson“list”键(在我的例子中,它存储列表对象的数组,即所有字符串)。无论如何,即使在索引字段配置时删除此键,在文档上载时仍会出现以下硬错误:

{["Field "l" does not exist in domain configuration (near operation with index 3; document_id null)",""add" operation must contain at least one "field" (near operation with index 5; document_id null)",""add" operation must contain at least one "field" (near operation with index 7; document_id null)","Field "l" does not exist in domain configuration (near operation with index 11; document_id null)",""add" operation must contain at least one "field" (near operation with index 13; document_id null)",""add" operation must contain at least one "field" (near operation with index 15; document_id null)","Field "l" does not exist in domain configuration (near operation with index 19; document_id null)",""add" operation must contain at least one "field" (near operation with index 21; document_id null)",""add" operation must contain at least one "field" (near operation with index 23; document_id null)","Field "l" does not exist in domain configuration (near operation with index 27; document_id null)",""add" operation must contain at least one "field" (near operation with index 29; document_id null)",""add" operation must contain at least one "field" (near operation with index 31; document_id null)","Field "l" does not exist in domain configuration (near operation with index 35; document_id null)",""add" operation must contain at least one "field" (near operation with index 37; document_id null)",""add" operation must contain at least one "field" (near operation with index 39; document_id null)"] }
细节

你好!!我有一个DynamoDB表,其中包含不到10个具有35个不同类型属性(字符串、数字、字符串列表和映射)的项。我正试图通过aws控制台gui使用CloudSearch为该表编制索引。当我进入索引字段配置页面时,我的大多数属性都会显示出来——尤其是缺少列表。但是,根据下图,索引器确实建议
“l”

我假设这是dynamodbjson列表键。我试着保留并删除这个建议,然后继续创建搜索域。不管怎样,十分钟后,当我试图上传文档时,我得到了上述错误

我发现从我的表项中删除所有列表会导致
“l”
建议消失,最终文档上传按预期进行

DynamoDB表项通过api创建(使用boto3的DynamoDB“
表”
”界面,如下所示:

body={}
#body作为常规python dict填充
dynamodb=boto3.resource('dynamodb')
表格=发电机表格(“表格名称”)
table.put_item(item=body,ConditionExpression='attribute_not_exists(ds_name)'
我在想,这里可能存在一个边缘情况,我应该使用更显式的boto3 DynamoDB客户端接口来创建项——但是使用上述方法可以毫无错误地工作,并且该项在DynamoDB gui查看器(树模式和文本模式)以及api“
.get\u item()中看起来完全正确和正常
“呼叫


可能相关:

得到AWS支持部门的响应——在撰写本文时,CloudSearch不支持
列表
映射
类型。有一个添加它们的开放请求,但“没有关于何时支持它们的ETA”。一个建议的替代方法是使用字符串列表,该列表应适用于我的用例