Search should remember where you were browsing

Suppose you are looking through a directory of colleges in Philadelphia. You have found the right category, but you want something more specific: information about scholarships. You type that word into the search box.

What should happen next?

If the search brings back scholarship pages from all over the web, it has discarded part of your request. You supplied the subject by typing. You supplied the collection by browsing. A search box that pays attention only to the typed word makes you explain the rest again.

This is one of the problems we addressed in PhillyFinder, the directory and search service at Philly.com. I developed its earlier versions in 1997. Karl Martino worked with me on version two, including its editor interface, search results and database. Our editorial and design colleagues helped shape the product and organize the information it searched. The useful idea was to let that organization do some work for the reader.

Searching the entries or searching the sites

A directory entry might contain a college's name, its web address and a short description. Searching those fields is useful if you are trying to find the college. It is much less useful if you want a scholarship application that lives several pages into its website. The directory's description need not contain the word you are looking for.

Full-text search can reach the words on those pages, provided they have been indexed. But the search engine also needs to know which sites you meant. Moving from a directory to full-text search should not mean starting your task over.

In PhillyFinder, choosing Sites in this Category makes the directory supply that scope. It looks up the sites assigned to the current category and its subcategories, then passes their search addresses to the search engine as a filter. The query still says what to look for. The filter says where to look. The navigation documentation describes this connection between the directory database and the index.

A reader can narrow the search further by checking individual sites. If only two colleges interest you, the other colleges need not remain in the search. You do not have to construct a complicated query describing which addresses to include. You have already made the choice in the interface.

That matters beyond saving a little typing. Adding "Philadelphia" to a keyword query is not necessarily equivalent to searching a chosen set of Philadelphia college sites. A relevant page might not repeat the city's name. An irrelevant page might mention it. Membership in a collection and the words on a page answer different questions.

The connection depends on information the directory's editors maintain. In PhillyFinder, an entry has an address used for indexing and a frequency for revisiting it. It can belong to more than one category. A site need not lose its place under education because it is also useful under another subject.

Those fields can look like administrative details. They influence what a reader can find. A useful site left out of the category will also be left out of a search restricted to that category. A page the index has not reached cannot appear merely because the right site is listed.

Editors organize a collection of sites. The index searches inside those sites. The reader can choose a collection without having to know how the search engine represents it.

We did not need to keep building every part of a search engine to make this work. The earlier development versions included our own crawling, indexing and storage code. Using an existing search and database platform let us concentrate on the directory, the editor's work and the connections between them. The project history and credits describe that division of work. The distinctive part of a product can be the way its parts cooperate, even when those parts are not all original.

Keep the scope visible

Remembering a reader's choice can also cause trouble if the choice becomes invisible. Someone may have finished looking at colleges and started searching for something unrelated. A narrow search that returns nothing should not leave them wondering whether nothing exists.

I want the search interface to make its boundary easy to see and change. A reader should be able to distinguish "nothing matched in these sites" from "nothing matched anywhere we searched." Widening the search should be an intentional next step, not a silent fallback that fills the screen with a different set of results. Sometimes a broader search is exactly what the reader needs. It should be their choice.

This gives me a useful way to examine an interface: follow one task across a change of screen or a change of tool. What did the person already tell us? Which of those choices should still apply? Can they see that the choices have carried over, and can they change them?

In the college example, the reader has done some of the work before reaching the search box. They found the collection that interests them. Our software ought to put that work to use.