Search Auto Complete

The very first time a user inputs a key stroke in the search box his search experience can be enhanced by either providing query suggestions or performing type ahead queries and showing the results.

Google and Bing are examples of search systems providing query suggestions.

Below are the query suggestions presented by Google while searching for “Designing with the Mind in Mind”

For the same query the user needs to type more characters in Bing to get the suggestion.

Linkedin and Facebook are examples of search systems performing type ahead queries.

Here is an example of type ahead search done on Linkedin while searching for “Yelp”

Providing search suggestions is more appropriate for systems in which users engage in textual or keyword based queries, while type ahead queries work better when users are searching for well known entities.

Benefits of Search Suggest Systems

Some of the benefits that users get from suggested queries are

  1. Spelling mistakes are avoided. Words like “Ratatouille” are almost impossible to spell correctly. Most search systems are unforgiving of mistakes made while entering the query terms. By providing query suggestions we greatly improve the users chance of finding what he is looking for by eliminating a large class of spelling mistakes.
  2. Fewer keys need to be typed. Most users do not touch type. Every key press involves significant cognitive load on the user. By providing suggestions that can be easily selected we reduce the efforts that users must take to use the search system.
  3. Suggestions provide immediate feedback in terms of what queries are possible. Query suggestions also provide immediate feedback in terms of what kind of queries the search system is capable of serving. The presence of a suggestion indicates that the search system should provide a useful response to the query. The absence of a suggestion could often indicate that the system may not contain appropriate responses for the query.

Goals for search suggest systems.

  1. Users should perceive that they are receiving the query suggestion instantaneously.

    Maximum interval between events for perception that one event caused another event: 140 milliseconds (0.14 second) This interval is the deadline for perception of cause and effect. If an interactive system takes longer than 0.14 second to respond to your action, you won’t perceive your action as having caused the response. For example, if the echoing of characters you type lags more than 140 milliseconds behind your typing, then you will lose the perception that you are typing those characters. Your attention will be diverted away from the meaning of the text and toward the act of typing, which slows you down, pulls typing out of automatic processing and into conscious processing, and increases your chances of making an error.

    Jeff JohnsonDesigning with the Mind in Mind
    From the above user must see the query suggestions within 150ms of pressing a key to perceive that they are instantaneous.

  2. Suggestions should be ordered by likelihood of them being entered by the user.

    Most search suggest systems are built by performing analysis of logs of the search system. Queries are scored based on how frequently they are entered and if they resulted in clicks on the search results. High scoring queries become the candidates for suggestions. In addition the ranking of the suggestions can be personalized for a particular user. The rankings can also be modified based on the category of the suggestion. For example for a library ILS system suggestions for book titles can be ranked higher than suggestions for DVD titles during weekdays while on weekends DVD titles could be ranked higher. results. While suggestions should be presented in the order of their score there might be a benefit to re-ordering them so that if a suggestion is the first word of another suggestion but it ranks lower then it should still be presented first.

  3. Completeness

    For a user to believe that the search suggestion systems is correctly guiding him it is important that the system be complete in terms of the suggestions that it provides. If a query has the potential of resulting in a search result with a high click through rate then that query should be provided as a suggestion when its prefix has been typed by the user. Here is an example of a search system that fails to do this. The user is searching for the book "Lady Tasting Tea" on Ebay. After typing "lady ta" he stops receiving suggestions. However when he completes the query he does find that Ebay sells the book.

  4. Correctness

    The query suggestions system should not provides suggestions which result in zero search results. Such suggestions reduce the users belief that the search auto complete system is correctly guiding his search exploration. It is indeed very rare to find a suggest system in production that does this.

javah jni error Illegal package name

The java class from which the header file is to be generated should not be provided as com\level1\level2\classname but as com.level1.level2.classname

John McAfee on rewards

Whatever the entrepreneur creates should be the reward, not just for the entrepreneur, but for everyone. I doubt that the inventor of the wheel made much money from it, but I don’t doubt that this person was internally rewarded

The Entrepreneur

The real question you have to ask yourself is, "Are you willing to exist or are you going to be special? And special is not what someone else thinks of you but what you think of yourself."

Malcolm Bricklin

Must watch internet TV The Entrepreneur


We don’t make movies to make money, we make money to make more movies.

Walt Disney

The American Dream

It is not a dream of motor cars and high wages merely, but a dream of social order in which each man and each woman shall be able to attain to the fullest stature of which they are innately capable, and be recognized by others for what they are, regardless of the fortuitous circumstances of birth or position.

James Truslow Adams

Terrorist attacks on Mumbai

Today is indeed a sad day for me. I was born in Mumbai and still have most of my relatives living there. For the first time I feel ashamed of calling myself an Indian. How can India as a country allow this? Do we have no pride? How can these people come and attack us whenever they want? The bombers of 93 are still unpunished. A neighboring country harbors these terrorists and we are powerless to do anything about them. As sad as I am I also have to accept my own complicit role in this state of affairs. A country’s wealth is not its natural resources but its people. After getting some of the best education that could be provided in the whole world I left India and came to the US. I and every Indian who has looked away and decided to leave government and politics to criminals is equally to blame.

Is Programming exciting?

Also, many a programmer derives a major part of his professional excitement from not quite understanding what he is doing, from the daring risks he takes and from the struggle to find the bugs he should not have introduced in the first place.

E.W. Dijkstra

Stockdale Paradox

“You must never confuse faith that you will prevail in the end – which you can never afford to lose – with the discipline to confront the most brutal facts of your current reality, whatever they might be.”