摘要
我有一个DynamoDB表,其中包含少于十个项目,我正在尝试使用CloudSearch编制索引。 CloudSearch索引器建议使用不存在的名为"l"
的属性。这似乎是以某种方式从DynamoDB JSON“列表”键(该列表键存储列表对象数组,在我的情况下为所有字符串)中获取的。无论如何,即使我在索引字段配置时删除了此键,在文档上载时仍然会遇到以下硬错误:
{["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表,其中包含少于十个项目,这些项目具有〜35个不同类型的属性(字符串,数字,字符串列表
和映射)。我正在尝试通过aws控制台gui用CloudSearch索引此表。当我进入索引字段配置页面时,我的大多数属性都会显示出来-列表中特别缺少。但是,索引器确实建议根据以下图像显示"l"
:我假设这是DynamoDB JSON列表密钥。我尝试过保留并删除此建议,然后继续创建搜索域。无论哪种方式,十分钟后,当我尝试上传文档时,都会出现上述错误。
我发现我的表格项目中的所有列表[[正在删除
都导致此"l"
建议消失,并且最终按预期进行了文档上载。DynamoDB表项是通过api创建的(使用boto3的DynamoDB“ Table
”接口,如下所示:body = {}
# body is populated as a regular python dict
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table("table_name")
table.put_item(Item = body, ConditionExpression = 'attribute_not_exists(ds_name)')
[我当时想也许这里有一个极端的情况,我应该使用更明确的boto3 DynamoDB客户端界面来创建项目-但使用上述方法可以正常工作,并且在DynamoDB中该项目看起来是完全正确和正常的gui查看器(在树和文本模式下)以及api“ .get_item()
”调用。
可能相关:Amazon CloudSearch creates Null ID from DynamoDB
总结,我有一个DynamoDB表,其中包含少于十个我正在尝试使用CloudSearch索引的项目。 CloudSearch索引器建议使用不存在的名为“ l”的属性。这似乎是某种原因...
list
和map
类型。有一个添加它们的公开请求,但是“何时支持它们尚无ETA”。建议的替代方法是使用String Set
代替适合我的用例的字符串列表。