I'm trying to get started with Amazon CloudSearch. I have my data in a DynamoDB Table that I want to search. I was able to set up the cloud search domain and it pulled the fields from the table and let me set them, etc. However I went to upload the data and I'm having some issues. I told it the DynamoDB table to pull from and it did it's data pull and told me it found the items and I pressed the import but it's giving me errors about needing at least one field and needing to have a non-null id.
I downloaded the list of documents that it is trying to upload and I see this (or similar) pretty frequently repeated throughout the documents:
{
"type": "add",
"id": "null",
"fields": {
}
},
{
"type": "add",
"id": "null",
"fields": {
"libraries": "721409e7-5fca-495d-a625-a5bc5f4a0434~d8ccd611-ae75-418b-91a3-13dd57d46934",
"shadecolor": "170-98-104",
"objecttype": "20",
"timestamp": "2017-01-25T22:43:53.672Z"
}
},
Obviously I can see that one of these documents has a null id and no fields at all, and the other has fields but no id which seems to be the issue. However I have no idea where this data is coming from and why it's generating it. The ID is my DynamoDB Hash Key so it can't be null or Dynamo wouldn't accept it. I have looked through my Dynamo data and I can't find any data like that...
Can someone tell me what may be happening here and the best way to deal with it to get my data into CloudSearch?
来源:https://stackoverflow.com/questions/42011755/amazon-cloudsearch-creates-null-id-from-dynamodb