Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Searching SimpleDB in a case-insensitive way

Since Amazon SimpleDB doesn't provide case-insensitive query, what w'd be the best way to do a case insensitive search for attributes in simpleDB ?

One thing that can be done is including a separate attribute that is the lowercase version of each string, and then use a 'like' query but it will involve a lot of duplication.Is there any elegant way to do the same ?

EDIT
I first tried keeping a separate attribute that was the lowercase version of text to be searched, and then used 'like' query, but the 'like' is not really fast enough for stuff i'm building and also the idea of adding redundant data and complexity to the application is not cool. So i integrated elasticsearch, and it is working quite fine so far + this gives more control over search.

like image 662
r15habh Avatar asked Apr 01 '11 08:04

r15habh


1 Answers

I've heard some people advocate the separate attribute idea and I agree that's probably the best solution. Just one of the drawbacks of leaving so much functionality in the application code I guess.

like image 102
Ryan Avatar answered Nov 15 '22 12:11

Ryan