May 22, 2009

Langalot...

1 comment

Is alive!

Check it out at langalot.com

March 5, 2009

Infix/Star searching with Thinking Sphinx

0 comments

Thinking Sphinx is great, absolutely the best sphinx plugin for ActiveRecord (and thus Rails) out there. Enabling infix/star searching isn’t readily apparent in the docs. Infix/star searching allows a search for “ren” to match “French”, “wrench”, “Ren”, “rent”, etc. Without it enabled, a search for “ren” will only return exact matches (from the previous list, only “Ren” would match).

To enable it for all your models, create RAILS_ROOT/config/sphinx.yml with something like the following:

development:
  enable_star: 1
  min_infix_len: 3

testing:
  enable_star: 1
  min_infix_len: 3

production:
  enable_star: 1
  min_infix_len: 3

Reindex and restart sphinx. Now if you do a search for *ren*, you’ll get everything that matches. If you want to always surround your queries with stars, you can add :star => true to your method call:

@words = Word.search(params[:q], :page => params[:page], :star => true)

This will obviously make your index bigger and make index generation take longer. Increasing the size of min_infix_len will make the index smaller.

January 29, 2009

ChatterBox

0 comments

Apple approved our first iPhone application, ChatterBox! It’s a fun little application that makes your iPhone say anything you type into it, in a lo-fi robotic voice. The text-to-speech isn’t perfect and the voice is a few decades behind current technology, which just makes it more fun.

Looking for something older? Visit the archives.
Returning user? Login