Better Search through Better Queries

Daniel Tunkelang
3 min readNov 10, 2017

--

I spend a lot of time helping companies improve their search engines. Much of my work involves returning better results for their users’ search queries. But there’s a better strategy: improving the queries themselves.

Less is More

A metric that most search engine owners track is the fraction of searches that return zero results. For the most part, a search that returns no results is a failed search.

But more results aren’t always better. A large result set creates information overload, making it difficult for searchers to find what they’re looking for.

A search query is an expression of the searcher’s intent. A large result set means either that the searcher didn’t express a specific intent, or that the search engine was unable to infer a specific intent from the search query.

Consider two searchers on a clothing site. The first searches for pants, while the second searches for womens black jeans. The first searcher will retrieve more results than the first, but the second is more likely to find something she wants to buy — assuming that the search engine correctly understands her intent. If the results for the second query include jean skirts and jean jackets, the search engine needs to improve its query understanding.

Specificity

While search can be a gateway to open-ended exploration and discovery, most searchers come to search with specific needs in mind. A search engine should encourage searchers to express these specific needs. Conversely, it shouldn’t drive searchers to create search queries that are less specific.

How do we measure the specificity of a search query? No metric is perfect, but here are some useful ones:

  • The number of search results: fewer results means more specific.
  • The number of query keywords: more keywords means more specific.
  • The presence of rare query keywords: higher inverse document frequency (idf) means more specific.

If you manage a search engine, I encourage you to analyze how your conversion rate — or whatever you use to measure search success — correlates to the number of search results or query keywords. Based on my experience, I’m confident you’ll find that more specific queries have dramatically higher conversion rates.

Helping Searchers Be Specific

Given that searchers have specific needs and that specificity drives higher conversion rates, you’d expect most search queries to be highly specific. But they’re not. On a typical search engine, most search queries contain one or two keywords, and very few contain more than three.

Why don’t searchers use more specific search queries? Here are the two main reasons:

  • Searchers are used to using short queries. Moreover, search engines often fail for long queries, so searchers have learned to avoid them.
  • Long search queries require effort. Searchers — particularly on mobile devices — rely on autocomplete, which tends to promote short queries.

Changing searcher behavior is difficult, but the stakes are high enough to justify the investment. Here are some ways to encourage searchers to use more specific queries:

  • Make the search box bigger. This simple user interface change reliably leads searchers to feel they should type more into the search box.
  • Favor more specific queries in autocomplete. Equivalently, favor queries with higher conversion rates — in general, those are more specific.
  • Offer natural-language interfaces, particularly voice interfaces. Searchers are more verbose — and more specific — when using natural language.
  • Improve query understanding. There’s no point encouraging searchers to use more specific queries if the search engine will fail to understand them.

Summary

Great search means not only returning the right results, but also helping searchers making the right queries. Most searchers have specific needs in mind, and the search engine should encourage searchers to express those needs. That encouragement can come from a larger search box, smarter autocomplete, or natural-language interfaces. Of course, it’s important that the search engine understand the specific queries it encourages.

Searchers who use specific queries are more likely to find what they’re looking for. Let’s make better search — through better queries!

--

--