Searching SimpleDB in a case-insensitive way
Asked Answered
M

2

6

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.

Marianmariana answered 1/4, 2011 at 8:57 Comment(0)
S
2

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.

Splenomegaly answered 2/4, 2011 at 2:40 Comment(0)
S
0

You could create a entire seperate domain which is a lowercase mirror of the real data. This search domain can also have other optimizations in it.

Then try to keep the two DBS in sync. Every so often you can toss the search domain and rebuild it. You can also rebuild the search domain when you come up with a new search strategy.

Sermonize answered 16/4, 2011 at 19:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.