'Designing DynamoDB database to be searchable by matching a list of strings
I am trying to set up a DynamoDB database where every item is a product. Each product has a list of 1-5 product IDs (12-digit numeric), for example:
{
'name': 'Dell XPS 13',
'productIDs': ['718766281267', '1283798127398', '120938012983', '23489023192837']
...
}
A search query would be an object of this type, and the database should return the item that has the highest number of overlap strings (number of IDs that exist in both the search query and the item), that is, the best match.
I am very new to DynamoDB, but I cannot seem to figure out if this is even possible. Any help would be greatly appreciated.
Edits:
- the product IDs should be unique to an item but they are imperfect so they may not be unique. Hence the need for a 'best match'
databaseamazon-web-services">
amazon-web-servicesnosqlamazon-dynamodb">
amazon-dynamodbdynamodb-queries


Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|