Older posts...
Older posts...
23 Sep
Designing APIs in a resource-oriented architecture
23 Sep 2014
Designing APIs in a resource-oriented architecture
28 Sep
How I'm going to land my dream job
28 Sep 2014
How I'm going to land my dream job
1 Oct
Neural net training fail
1 Oct 2014
Neural net training fail
13 Oct
Pow + SSL without the hassle
13 Oct 2014
Pow + SSL without the hassle
17 Oct
Using machine learning to rank search results (part 1)
17 Oct 2014
Using machine learning to rank search results (part 1)
23 Oct
Using machine learning to rank search results (part 2)
23 Oct 2014
Using machine learning to rank search results (part 2)
9 Nov
Managing complexity in Go
9 Nov 2014
Managing complexity in Go
25 Nov
Remote work: an engineering leader's perspective
25 Nov 2014
Remote work: an engineering leader's perspective
19 Sep
Running A/B tests on our hosting infrastructure
19 Sep 2016
Running A/B tests on our hosting infrastructure
27 Mar
Every service is an island
27 Mar 2017
Every service is an island

Fuzzily, a Ruby gem for blazing-fast fuzzy text search

I just released fuzzily, a small piece of software that gives you a way to very quickly perform fuzzy searches against tables in exchange for a little data and write overhead.

It’s a trigram-based, database-backed fuzzy string search/match engine for Rails.

Loosely inspired from this old blog post.

Anecdotical benchmark: against our whole Geonames-derived table of locations (3.2M records, about 1GB of data), on my development machine (a 2011 MacBook Pro)

  • searching for the top 10 matching records takes 6ms ±1
  • preparing the index for all records takes about 10min
  • the DB query overhead when changing a record is at 3ms ±2
  • the memory overhead (footprint of the trigrams table index) is about 300MB

This looks like it scales very well, since the total number of possible trigrams is low (about 19k).

Pretty fast if you ask me!