If you are planning to use Ruby in any project that will need to search anything, pay close attention to Ferret - a Ruby port of Lucene.
Back in January, I started my rewrite of CD Baby in Rails - but one of the biggest unsolved problems was search :
- over 100,000 albums (and adding 200 new albums a day!)
- over 1,000,000 songs
- need to be searchable not just by exact-match, but partial-match and mis-spelling
- results need to be weighted so that exact-match result comes before partial-match
- every search must search these six fields: artist, album, style, description, mis-spellings, similar-artists
- result matches need to be weighted in this order of fields: artist, mis-spellings, similar-artists, album, style, description
- all this has to happen in under 1 second




