1

I came to know that DynamoDb doesn't support case-sensitive search on a particular column/attribute (say column_A), Hence attempted to create a new column/attribute (say column_A_Lower) that contains same content as column_A but completely in lower case. I am doing this by scheduling a thread for every 5 minutes, that picks newly created items/rows in the table, add new required lowercase version of attributes and then batch update. This approach seems to be very slow and requires strongly consistent reads, to perform further updates as already updated items need not be updated again. What could be the better way to replicate an attribute value with lower case content? Do conditional update can serve our purpose in any way?

arodriguezdonaire
  • 5,396
  • 1
  • 26
  • 50
  • Why can't you add this attribute when the item is created from application side? – Harshal Bulsara Aug 06 '15 at 12:28
  • Better to not treat DynamoDB as a search platform, like possibly [CloudSearch](http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-dynamodb-data.html). – mkobit Aug 06 '15 at 14:11
  • Its a so simple task, i does not knew that search by lowercase imply wich i'm trying to use a nosql document-oriented database as a search engine platform... Searching about it on firebase, and check wich they does not provide case insensitive query too... https://stackoverflow.com/questions/37643459/case-insensitive-sorting-with-firebase-orderbychild The issue is about the costs of CloudSearch or ElasticSearch, but i'm just comment it for those will check this thread and try to confirm wheter there is another way of do that... – Richard Lee Jul 20 '17 at 08:30

1 Answers1

0

You can do a conditional update: Use updateExpression: "attribute_not_exists(column_A_lower)"

Ben Schwartz
  • 1,716
  • 13
  • 14