Relational Database will not die

Last 3 month ago, I learnt the mongodb because I want to use in ornagai. I though , it will be fast when I use mongodb. However , mongodb can’t solve for sorting. I wrote like

$regex=’/.sim./i’; $find[‘Word’]=new mongoRegex($regex); $cursor = $collection->find($find);

for searching sim words. I got the results like following.

assimilate facsimile fortissimo generalissimo passim persimmon persimmons similar similarly simple simple hurt simpler simplest simply

But I want to sort the results like following pattern.

1. sim 
2. sim 
3. sim 
4. sim

Mongodb can’t sort like this. I need to sort from client side and save in the cache. It’s a expensive work loading for me. So, I decided to reuse Mysql instead. MySQL can sort with IF or CASE condition in SQL. Yes, I can make with ranking system for sort. But I don’t want to make a ranking system for search and no need to do like this. NoSQL is a great but can’t solve everything and can’t search sort some complex sorting. I need to do in the client side for sorting. So, my opinion is MySQL or Relational Database can’t die easily.
comments powered byDisqus