On Wed, Apr 22, 2009 at 1:07 PM, Brian Armstrong <[email protected]> wrote: > 1. When it came time to implement full text searching, my first choice > (sphinx) was out and i saw a thread where you guys suggested tsearch2 > for Postgresql. I managed to get this up and running, but to test/ > develop it I now had to switch to postgresql locally.
tsearch turned out not to be a viable option. Based on heavy research we've determined that there are two best choices for full text search, depending on the size of the data you are indexing: http://docs.heroku.com/full-text-indexing Both of these are totally database independent. > 3. Another unexpected change is that Postgresql apparently does case > sensitive searches by default. [...] > > So despite testing it locally with MySQL, I now have a variety of > duplicates in my production database from case sensitivity. This > caught me totally off guard. I've had to go through and change code > from a number of plugins to use ILIKE instead of LIKE which postgresql > apparently prefers. I've had to learn all this since I'm totally > unfamiliar with Postgresql. I was unaware of this difference previously, but now that you point it out I agree it's one of the few significant points of incompatibility. I experimented with SQLite and discovered that it behaves like MySQL on the like clause. Rather than developing locally on Postgres and adapting your database code work with it, I suggest instead that you look for ways to make your app 100% cross-database compatible. Just taking a couple minutes to play around, I came up with this: user = User.find(:all, :conditions=>["lower(name) like lower(?)", "brian"]) This will work correctly on the big three, and I suspect on most other SQL-compatible databases as well. Personally, I prefer to use SQLite for all my local development. This forces me to code to the lowest common denominator. In this particular case it wouldn't have helped, but in most others it's very effective at preventing me from getting too fancy - which results in more portable database code. Adam --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/heroku?hl=en -~----------~----~----~----~------~----~------~--~---
