Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Suggest, how it works?

How does Google Suggest work? How does it manage to update the web page on the client so quickly, based on information in a distant Google database? Why does the web page not look ‘jumpy’ if it is being frequently updated?

like image 796
smallB Avatar asked Jun 25 '11 15:06

smallB


People also ask

How do suggested searches work?

Query suggestions or autocomplete - also known as recommended searches, suggested search terms, or typeahead, is a search feature that predicts the end of the search term as well as the next word or phrase as the user starts typing it. Suggested queries appear in a dropdown menu below the serch box.

How do suggestions work?

Suggestion is the psychological process by which a person guides their own or another person's desired thoughts, feelings, and behaviors by presenting stimuli that may elicit them as reflexes instead of relying on conscious effort.

How does Google auto suggest influence?

The first step to influencing auto-suggest results is to select the suggestion phrase you want, and then create a website address for Google that represents that search. If you Google search “Andy Warhol modeling agency”, the resulting search page will have a very specific URL, not just the standard “google.com”.

Are Google Search suggestions personalized?

Turn off Personal resultsIf you're signed in to your Google Account and have Personal results turned on, you might also get personalized predictions and recommendations in Google Search. If you don't want to get these predictions and recommendations, turn off Personal results.


2 Answers

It uses AJAX.

When you are writing your query, it searches for the 10 most requested words matching yours. Then it writes minified JSON on an invisible DIV element. Fast, but still resource intensive.

Try to install Firebug on Firefox or use the Developer Console on Chrome, open the console and start writing "Youtube" or whatever you want. You will see the minified JSON responses.

Good luck :D

like image 84
Ryan Casas Avatar answered Oct 04 '22 23:10

Ryan Casas


In addition to the front-end handling others have talked about, which jQuery is a great example of, you might also be interested in how they approach the idea on the backend. Dr. Peter Norvig has written about how to create a spelling corrector, where similar approaches could be used to find close matches.

like image 30
Kyle Burton Avatar answered Oct 05 '22 00:10

Kyle Burton