问题
Im trying to add some flexible search functionality to my dynamoDB, so I set up the AWS CloudSearchDomain service. Which I believed could add a wrapper around my dynamoDB and retrieve documents with flexible search options.
Since implementing I realised that adding an item to my dynamoDB does not automatically add the item to the searchable CloudSearchDomain documents. The AWS docs advise to sync the DB items with the CloudSearchDomain periodically, such as at the end of each day. But I want my newly added items to be available for search as soon as its in the DB.
I also realise the documents that get returned from a CloudSearchDomain endpoint are not my plain json dynamoDB items. Each search result is wrapped in a 'hits' array, and all the property values are wrapped in arrays and its just a bit messy to handle on the front end. So is this the right tool for flexible searching the dynamodb. How are others using CloudSearchDomain with DynamoDB?
Im using the javascript sdk with node.js.
来源:https://stackoverflow.com/questions/44530846/keeping-aws-cloudsearchdomain-in-sync-with-dynamodb