Rapid Red

Your rapid development experts

Ruby on Rails by proven experts.

Faceted navigation in DigtheDirt

DigtheDirt has an extensive search system built in. I’ll talk more about the meta model in a bit, but for now, I wanted to talk about the tagging system.

The site uses a user interface style called faceted navigation. If you go to the plants page, you’ll see a list of facet groups on the left. Those all expand via remote JavaScript. You can search on any plant attribute, from sun exposure, to soil type/composition/pH, to bloom color and time. I decided not to use indexed search because:

  • I wanted tighter control of the metamodel within the search
  • I needed to use the tags for many other associations, so we could associate plants with member contributions and users.
  • I wanted to keep the deployment footprint dead simple.

So in general, every plant attribute is a tag. For search time behavior, it’s great because I have to count tags early and often, and tags are easy to count.

But write-time performance suffers, and it’s more complex to render a simple plant. I’ll talk about why this tradeoff doesn’t matter as much in a later post.

Next, I’ll introduce the plant card system and the adaptive search.

Blog