DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Data Engineering
  3. Databases
  4. Designing Search (part 2): As-you-type suggestions

Designing Search (part 2): As-you-type suggestions

Tony Russell-rose user avatar by
Tony Russell-rose
·
Mar. 05, 12 · Interview
Like (0)
Save
Tweet
Share
11.92K Views

Join the DZone community and get the full member experience.

Join For Free

have you ever tried the “ i’m feeling lucky ” button on google? the idea is, of course, that google will take you directly to the result you want, rather than return a list of results. it’s a simple idea, and when it works, it seems like magic.

i'm feeling lucky on google

but most of the time we are not so lucky. instead, we submit a query and review the results; only to find that they’re not quite what we were looking for. occasionally, we review a further page or two of results, but in most cases it’s quicker just to enter a new query and try again. in fact, this pattern of behaviour is so common that techniques have been developed specifically to help us along this part of our information journey. in particular, three versions of as-you-type suggestions—auto-complete, auto-suggest, and instant results—subtly guide us in creating and reformulating queries.

5.2.1 auto-complete

one of the key principles in human-computer interaction is recognition over recall : the notion that people are better at recognizing things they have previously experienced than they are at recalling them from memory. this explains why most of us can find our way around graphical operating systems such as windows and os/x, but when faced with a naked command line, we’re lost for words.

auto-complete transforms a recall problem into one of recognition. as you type into the search box, it tries to predict your query based on the characters you have entered. like a human interpreter mediating between two people speaking different languages, auto-complete facilitates the dialogue between user and search application. the uk’s national rail website, for example, recalls the railway stations that match a handful of characters. we must simply recognize the one we want:

auto-complete at the uk national rail enquiries website

auto-complete does its best to remain unobtrusive: we can still enter the query in full if we choose. but in selecting these completions we save time and keystrokes. moreover, they help us avoid spelling mistakes: if we can’t recall the exact spelling of “aberystwyth”, no problem—we just need to know it when we see it. this type of interaction is invaluable in mobile contexts, when accurate typing on small, handheld keyboards is more difficult. on smartphones and tablets we see it applied to all manner of applications, from text messaging to email (see figure x).

auto-complete is used for sms and email on the iphone

auto-complete makes the most sense when the choices are based on a controlled vocabulary , i.e. a finite list of items, such as a directory of names, locations, organisations, and so on. but what of situations where the choices are potentially unbounded? or of situations where we’re not exactly sure what we’re looking for to start with? as we saw earlier , in exploratory search and other complex information seeking tasks there may be no such thing a single ‘right answer’ . in this context, a different approach is needed.

5.2.2 auto-suggest

there’s a thin line between auto-complete and auto-suggest: both offer varying degrees of support for query creation and reformulation, and the terms are used somewhat interchangeably by many people. but if we were to draw a precise distinction, it could be this: the purpose of auto-complete is to resolve a partial query, i.e. to search within a controlled vocabulary for items matching a given character string. by contrast, the purpose of auto-suggest is to search a virtually unbounded list for related keywords and phrases (which may or may not match the precise query string).  while auto-complete helps us get an idea out of our head and into the search box, auto-suggest actually throws new ideas into the mix. in this respect, auto-suggest operates at a more conceptual level, offering choices where the relationship to the query may go beyond than simple string matching. both techniques save keystrokes and help us avoid spelling mistakes, but auto-suggest can also help us construct a more useful query than we might otherwise have thought of on our own. ebay , for example, provides a variety of different suggestions related to the query “guitar”:

auto-suggest at ebay

moreover, the same product categories that we saw earlier being used to provide scoped search can also be used to drive product suggestions. home depot , for example, provides a particularly extensive auto-suggest function, consisting of product categories, buying guides, project guides and more. not only do these suggestions facilitate known-item search, they also support exploratory search behaviour, encouraging the user to discover new product ideas and specialist content. while the home depot example demonstrates what’s possible with auto-suggest, it’s worth noting that moving from a single to multiple lists of suggestions demands greater mental effort from users.

auto-suggest supports known-item and exploratory search at home depot

one unique asset that the major web search engines have at their disposal is access to vast quantities of user data, which they can mine to maximise the value of query suggestions. google, for example, derives its suggestions both from the user’s individual search history and from the collective behaviour of many users. yahoo takes a slightly different approach, leveraging its extensive network of web properties and resources to provide an auto-suggest function that features a secondary panel containing answers and rich content:

auto-suggest offers answers and rich content at yahoo

a further technique to optimise the value of query suggestions is to display them in the context of recent searches. one approach, which safari utilises, is to simply present two adjacent groups: one for query suggestions and another for the browser’s search history:

query suggestions are presented alongside recent searches in safari

5.2.3 instant results

auto-complete and auto-suggest are both valuable techniques to help us conceive and articulate more effective queries. they differ in approach, but share the principle that as-you-type suggestions provide a shortcut from query to search results. but in some cases it is possible to go even further than this. in some instances, auto-suggest doesn’t offer query reformulations at all, but instead offers actual results to the user. for example, if we type the characters “ip” into the search box at apple.com , six items appear. however, if we select one of these, it bypasses the search results page entirely and takes us directly to a product-specific landing page. rather than suggesting alternative queries, the search box provides “instant results” in the form of a set of matching “best bets” for products and resources:

instant results at apple.com

we can see a similar principle in action in the search function of popular desktop operating systems.  in windows 7 , for example, a keyword search invokes a panel of recommended results, grouped into popular categories. we can either select one directly to open it, or choose the “see more results” option to open a regular search results page:

instant results in windows 7 desktop search

figure x: instant results in windows 7 desktop search

of course, in desktop search and online retail the instant results experience can exploit the metadata of a managed collection to optimise the relevance of categories and results.  on the web, by contrast, it is somewhat harder to pre-emptively match queries with results in this way. nonetheless, google provides its own type of “instant results”, which complement their auto-suggest function to provide a highly responsive search experience. instead of presenting a static page of results after each query, google instant updates the search results in real time as each character is entered. if we don’t see the results we want, we can just keep typing and watch the results update.

instant results when searching via google

in common with auto-complete and auto-suggest, instant results can save us time and help avoid spelling mistakes. but more importantly, by providing immediate feedback on our query, instant results can facilitate a more interactive dialogue between user and search application. of course, it may not be the complete solution for expert users wishing to explore and understand highly complex information spaces, but for known-item search and other information retrieval tasks , it provides a clear benefit.

summary

although most of us are familiar with google’s iconic “i’m feeling lucky” button, few of us use it: we know that search problems of any complexity require an iterative approach, punctuated by the creation and reformulation of queries.  and in this endeavour, as-you-type suggestions have become invaluable. auto-complete is better suited for known-item search and simple information retrieval tasks; auto-suggest works well for exploratory search and complex information seeking tasks; and instant results provide a direct channel from queries to answers.

  • use auto-complete to:
    • facilitate accurate and efficient data entry
    • select from a finite list of names or symbols
  • use auto-suggest to:
    • facilitate novel query reformulations
    • select from an open-ended list of terms or phrases
    • encourage exploratory search (with a degree of complexity and mental effort that is appropriate to the task)
  • for further guidance on detailed interaction design for auto-complete and auto-suggest, see the endeca ui design pattern library (note that while this resource provides valuable guidance, it conflates the different use cases described above)
  • where appropriate, complement search suggestions with recent searches
  • use instant results to promote specific items or products

Database

Published at DZone with permission of Tony Russell-rose, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Key Elements of Site Reliability Engineering (SRE)
  • 7 Ways for Better Collaboration Among Your Testers and Developers
  • Utilizing Database Hooks Like a Pro in Node.js
  • Reconciling Java and DevOps with JeKa

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: