Chapter 11. Searching and browsing

In principle, our alphabetical community index lets any user find any other user, but using it in this way would be terribly cumbersome. In this chapter, we add more convenient and powerful ways to find users. We begin by adding full-text search to RailsSpace by making use of an open-source project called Ferret. We then stalker-enable our site with browsing by age, sex, and location.

Adding search and browse capability to RailsSpace will involve the creation of custom pagination and validations, which means that we will start to rely less on the built-in Rails functions. This chapter also contains a surprising amount of geography, some fairly fancy finds, and even a little math.

11.1. Searching

Though it ...

Get RailsSpace: Building a Social Networking Website with Ruby on Rails™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.