Slashdot Mirror


Google Suggest

Cristiano writes "As you type into the search box, Google Suggest guesses what you're typing and offers suggestions in real time. This is similar to Google's 'Did you mean?' feature that offers alternative spellings for your query after you search, except that it works in real time." It crashes Konqueror, but works nicely on Mozilla. Update: 12/11 by J : The engineer who thought of it, then built it in his "20% time," blogs about the process.

35 of 655 comments (clear)

  1. /. Spelling by Zorilla · · Score: 3, Funny

    > loose

    Google
    ------
    Did you mean: lose?


    Yeah, Slashdot needs this badly.

    --

    It would be cool if it didn't suck.
    1. Re:/. Spelling by MillionthMonkey · · Score: 4, Funny

      When I type "loose" it doesn't suggest "lose".

      It does suggest "loose women".

    2. Re:/. Spelling by RobertB-DC · · Score: 4, Funny

      When I type "loose" it doesn't suggest "lose".

      It does suggest "loose women".


      It also suggests "loose weight". I can't believe how many web sites there are devoted to loosing weight. I guess that's the origin of the term, "to throw your weight around" -- so many people loosing it, and throwing weight will certainly loose it. What a bunch of loosers.

      (and looking at that paragraph long enough makes me wonder if I've loosed it, myself)

      --
      Stressed? Me? Of course not. Stress is what a rubber band feels before it breaks, silly.
  2. Cool! Just like form AutoComplete by GillBates0 · · Score: 4, Insightful
    but with a HUGE database/archive of possible candidates at it's disposal.

    Wonder how it'll hold up when it gets out Beta though...it's bound to be pretty computationally intensive.

    --
    An Indian-American Hindu committed to non-violent thought/speech/action alarmed by the global explosion of radical Islam
    1. Re:Cool! Just like form AutoComplete by mdf356 · · Score: 5, Funny

      It's surviving a slashdotting. What more do you want?

      Cheers,
      Matt

      --
      Terrorist, bomb, al Qaeda, nuclear, yellowcake, kill, assassinate. Carnivore is dead... long live Echelon.
    2. Re:Cool! Just like form AutoComplete by dustinbarbour · · Score: 4, Informative

      Yes, it would be intensive for their server should everyone decide to use it in place of standrd Google search. However, the algorithm behind their "Did you mean" runs in O(n^2) worst case and O(n) best case. Not too shabby.. The algorithm is what makes it possible.

    3. Re:Cool! Just like form AutoComplete by ciroknight · · Score: 3, Interesting

      This is why Google is such an awesome concept.

      Instant access to any piece of human knowledge, and it now can guess what you are looking for right as you can type. The only next improvement I can think of is if it did related searches to the term you searched for, but I'm not sure how you would represent all of that data at once. Leave it to the Google geniuses ;)

      --
      "Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
    4. Re:Cool! Just like form AutoComplete by eln · · Score: 3, Informative

      big-O notation

      (definition)

      Definition: A theoretical measure of the execution of an algorithm, usually the time or memory needed, given the problem size n, which is usually the number of items. Informally, saying some equation f(n) = O(g(n)) means it is less than some constant multiple of g(n). The notation is read, "f of n is big oh of g of n".

      Strangely enough, I got this definition from a Google search.

    5. Re:Cool! Just like form AutoComplete by Chris+Mattern · · Score: 3, Interesting

      Nice, but not answering his question. He didn't ask what O(n) was, he asked what n is, and that's a legitimate question. What *is* n? What is the determining factor of problem size for this algorithm? The number of characters the user has typed? The size of the database of terms Google will search? What?

      Chris Mattern

  3. Try this: by elid · · Score: 5, Interesting

    Type in g. Then type o. Then type o again. And again. Keep typing o's... Look what happens :-)

    1. Re:Try this: by kzinti · · Score: 3, Interesting

      So why is it that goooooooooooooooogle, with 16 o's, has over 23000 hits, while strings with one more or one fewer o have only hundreds of hits?

      gooooooooooooooogle 618
      goooooooooooooooogle 23,300
      gooooooooooooooooogle 198

      I thought maybe it was a power-of-two thing, but other such disparities happen at non 2^n transitions. Interesting.

  4. Crashes Konqeuror? by Shaman · · Score: 5, Informative

    Not mine. Worked like a charm. Version 3.3.2 on Gentoo Linux 64bit

    --
    ...Steve
  5. Is it any coincidence by Moth7 · · Score: 4, Funny

    That when you enter "P", the first suggestion is "Paris Hilton"? I guess this just proves that porn really does drive every new technology ;-)

    1. Re:Is it any coincidence by IdleTime · · Score: 3, Funny

      No, it just means that you are a porn freak!

      Their suggestions is ofcourse based on earlier interests shown from your ip. So when you type capital P, google knows that you are not intereste in Paris, France but Paris Hilton and no, it's not a hotel!

      --
      If you mod me down, I *will* introduce you to my sister!
  6. Advertising potential by Anonymous Coward · · Score: 3, Insightful

    I wonder how long it will take before companies are able to pay for their 'suggestions' to show up at the top of the list.

  7. How is it so FAST!? by topham · · Score: 3, Interesting


    It is blazingly fast. I expected it to be slowwwww.
    Can somebody outline how it works?

    1. Re:How is it so FAST!? by loconet · · Score: 5, Interesting

      Everytime you type a letter, it requests a special modified version of the search tool which only returns the necessary javascript data.

      check itout

      Impressive

      --
      [alk]
    2. Re:How is it so FAST!? by nacturation · · Score: 3, Informative

      Type livesearch into the box and hit I'm feeling lucky. You'll then find the details of what I'm positive inspired this. Essentially, as you type it passes data via an XMLHttpRequest control to the server which then returns a list of the top 10 elements and the page gets updated.

      --
      Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
  8. I can see it now by Timesprout · · Score: 4, Funny

    "It looks like you are searching for lesbian porn, would you like some help with that?"

    "It looks like you are searching for lesbian porn again, do you remember what I showed you last time?"

    "I know, I know, Lesbian porn,and can you rate these pages so I can update my page index?"

    "Hello freak, try these"

    --
    Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
    What truth?
    There is no dupe
  9. The ABCs of Google Complete by Hatta · · Score: 5, Interesting

    A is for Amazon
    B is for Best Buy
    C is for CNN
    D is for Dictionary
    E is for Ebay
    F is for Firefox (yay!)
    G is for Games
    H is for Hotmail
    I is for Ikea
    J is for Jokes
    K is for Kazaa
    L is for Lyrics
    M is for Mapquest
    N is for News
    O is for Online dictionary
    P is for Paris Hilton (wtf?!)
    Q is for Quotes
    R is for Recipes
    S is for Spybot
    T is for Tara Reid
    U is for Ups
    V is for Verizon
    W is for Weather
    X is for Xbox
    Y is for Yahoo
    Z is for Zip Codes

    --
    Give me Classic Slashdot or give me death!
    1. Re:The ABCs of Google Complete by dwvanstone · · Score: 5, Interesting

      Just to add to the list:

      1 is for 1
      2 is for 2004 election
      3 is for 3m
      4 is for 411
      5 is for 50 cent
      6 is for 60 minutes
      7 is for 7th heaven
      8 is for 89.com (as bad as Paris Hilton!!)
      9 is for 911

    2. Re:The ABCs of Google Complete by Anonymous Coward · · Score: 5, Interesting

      Explain THIS though:
      x : xbox
      xx: xxl
      xxx:

      p: paris hilton
      po: poems
      por: porsche
      porn:

      s: spybot
      se: sears
      sex:

      Somehow, I don't think these are based purely on search requests :)

    3. Re:The ABCs of Google Complete by kzinti · · Score: 3, Insightful

      That is based on alphabetics ordering, I think it would make more sense to sort based on rating.

      Google is ranking these suggestions so that the ones you're most likely to search for are higher. So even though 's' has more hits than 'spybot', Google thinks you're more likely to search for 'spybot'. That makes sense - the terms people search for most often are not necessarily the pages with the most search results (or the highest Pagerank).

  10. What Google needs is Lexis-Nexis and Journal tabs by F34nor · · Score: 3, Insightful

    What Google really needs is a for pay LexisNexis tab so you can find real information from real sources in real time. That and a tab that indexes full text medical and science journals. Those damn journals! I love em but I don't have hundreds of dollars a year for each Psych. journal I want to read and hate going to libraries if I just want to see what's shaking in the world of science. With full text periodicals and full test journal search Google would become a singularity of information.

  11. Re:Wow by Freexe · · Score: 3, Interesting

    Its javascript, using the XMLHTTP object to communicate with the server directly

    You can see it http://www.google.com/ac.js cant say i understand it, Gmail using the same thing but way more advanced.

    --
    "In a time of universal deceit - telling the truth is a revolutionary act." - George Orwell
  12. Advertising potential? by gavint · · Score: 5, Interesting

    Looks nice, but what happens when you type "the"?

    "the incredibles"

    Is anyone else seeing the advertising possibilities?

  13. Implementation details by JavaRob · · Score: 4, Informative

    The source for the page is quite simple; most of the work happens in a condensed JavaScript library. Not easy reading (note the word "condensed" above, meaning function and variable names are 1 or 2 chars, and all extra whitespace was removed...), but it's actually pretty straightforward.

    It disables your browser's autocomplete on that textfield (for obvious reasons). Then it basically just defines a hidden div for that auto-complete dropdown (variations on this depending on browser... frickin' incompatibilities).

    Each time you type a character, it populates that div body with the results of a quick, tiny query back to Google. It's NOT running the search for you; it's hitting (I assume) a simple, probably totally in-memory list of the most popular searches and number of results. That's how it can be so quick a response -- the lookup on their end is super-minimal, and the data to be transferred is probably less than 1k each time.

    Cool. Nice concept, nice execution. And one of those nice "only obvious in hindsight" additions.

    Even cooler -- it looks like (from the js file) they are supporting multiple languages here, not just English. Anyone using want to test this out for me? I think even Chinese is supported (or maybe that's the one that isn't.. I don't want to take the time to parse this properly).

  14. Obfuscated Javascript by jdludlow · · Score: 3, Interesting

    http://www.google.com/ac.js

    The Javascript is ripped to shreds as far as readability goes, but buried in there somewhere is the key to making your own app based on this. If you were so inclined to piggy-back on top of this technology. Not that I'd advocate such things.

    // Copyright 2004 and onwards Google Inc.

    var w="";var pa=false;var ta="";var da=false;var g="";var G="";var m="";var j=-1;var h=null;var Z=-1;var za=null;var Ca=5;var q="";var Lb="div";var Bb="span";var la=null;var a=null;var b=null;var Xa=null;var mb=null;var X=null;var ha=null;var ra=false;var kc=null;var hc=null;var Ua=new Object();var ca=1;var Aa=1;var Y=false;var na=-1;var Va=(new Date()).getTime();var Q=false;var k=null;var sa=null;var E=null;var B=null;var aa=null;var Ba=false;var Ka=false;var p=60;var ia=null;var ya=null;var W=0;InstallAC=function(frm,fld,sb,pn,rl,hd,sm,ufn) {la=frm;a=fld;Xa=sb;if(!pn)pn="search";ia=pn;var Kb="en|";var Jb="zh-CN|zh-TW|ja|ko|vi|";if(!rl||Kb.indexOf(rl+" |")==-1)rl="en";ha=nb(rl);if(Jb.indexOf(ha+"|")==- 1){X=true;Y=false;Ba=false}else{X=false;if(ha.inde xOf("zh")==0)Y=false;else Y=true;Ba=true}if(!hd)hd=false;ya=hd;if(!sm)sm="qu ery";w=sm;mb=ufn;ac()}
    ;function Yb(){ra=true;a.blur();setTimeout("sfi();",10);retu rn}
    function Fb(){if(document.createEventObject){var y=document.createEventObject();y.ctrlKey=true;y.ke yCode=70;document.fireEvent("onkeydown",y)}}
    func tion nc(vb){var y=document.createEventObject();y.ctrlKey=true;y.ke yCode=vb;document.fireEvent("onkeydown",y)}
    funct ion gc(event){}
    function ic(event){}
    function Pb(event){if(!event&&window.event)event=window.eve nt;if(event)na=event.keyCode;if(event&&event.keyCo de==8){if(X&&(a.createTextRange&&(event.srcElement ==a&&(bb(a)==0&&lb(a)==0)))){cc(a);event.cancelBub ble=true;event.returnValue=false;return false}}}
    function mc(){}
    function Db(){if(w=="url"){Ha()}ba()}
    function ba(){if(b){b.style.left=ob(a)+"px";b.style.top=Qb( a)+a.offsetHeight-1+"px";b.style.width=Ja()+"px"}}
    function Ja(){if(navigator&&navigator.userAgent.toLowerCase ().indexOf("msie")==-1){return a.offsetWidth-ca*2}else{return a.offsetWidth}}
    function ac(){if(jb()){Q=true}else{Q=false}if(pa)E="complet e";else E="/complete/"+ia;sa=E+"?hl="+ha;if(!Q){qa("qu","" ,0,E,null,null)}la.onsubmit=Fa;a.autocomplete="off ";a.onblur=Ob;if(a.createTextRange)a.onkeyup=new Function("return okuh(event); ");else a.onkeyup=okuh;a.onsubmit=Fa;g=a.value;ta=g;b=docu ment.createElement("DIV");b.id="completeDiv";ca=1; Aa=1;b.style.borderRight="black "+ca+"px solid";b.style.borderLeft="black "+ca+"px solid";b.style.borderTop="black "+Aa+"px solid";b.style.borderBottom="black "+Aa+"px solid";b.style.zIndex="1";b.style.paddingRight="0" ;b.style.paddingLeft="0";b.style.paddingTop="0";b. style.paddingBottom="0";ba();b.style.visibility="h idden";b.style.position="absolute";b.style.backgro undColor="white";document.body.appendChild(b);Ma(" ",new Array(),new Array());Gb(b);var s=document.createElement("DIV");s.style.visibility ="hidden";s.style.position="absolute";s.style.left ="-10000";s.style.top="-10000";s.style.width="0";s .style.height="0";var M=document.createElement("IFRAME");M.completeDiv=b ;M.name="completionFrame";M.id="complet

  15. Re:Google starts to suck by diamondsw · · Score: 3, Interesting

    So they screwed up Groups. What does that have to do with Suggest, which looks like a classic "awesome! why didn't anyone else do it that way?" Google feature?

    --
    I don't know what kind of crack I was on, but I suspect it was decaf.
  16. Yippee! A new source of amusement! by slcdb · · Score: 4, Funny

    I got a real kick out of some of the suggestions.

    my cat: ... hates you ... breath smells like cat food ... hates me ... is an alien

    my girlfried:
    (No suggestions, obviously Google is run by a pack of lonely nerds).

    my boyfriend: ... is gay ... sucks ... cheated on me ... hates me ... dumped me
    (Okay, make that an apparently gay pack of lonely nerds).

    darth vader is: ... gay
    (A delusional pack of gay nerds?)

    Oh, the fun I'll have with this new toy when I'm bored at work.

    --
    Despite what EULAs say, most software is sold, not licensed.
    1. Re:Yippee! A new source of amusement! by mldqj · · Score: 3, Funny
      my girlfried:
      (No suggestions, obviously Google is run by a pack of lonely nerds).

      No, it's just because you misspelled girlfriend.

  17. Re:I call foul: CENSORSHIP by recursiv · · Score: 3, Funny

    I agree with your conclusion, but I just had to stop and point out that you don't condone one-handed sex searching. Hilarious!

    Careful though, some pervs our there might think you were talking about wanking, jagging, or otherwise masturbating. (Horrors!) They might not get your true message about amputees.

    I keed, I keed. I was just very amused with puritanical way you approached the subject, and that you went the extra step not to condone it.

    --
    I used to bulls-eye womp-rats in my pants
  18. Re:URL is same, with ?complete=1? by Wiseleo · · Score: 3, Informative

    In the IE version, here is the function (for those curious how it all works, download www.google.com/ac.js)

    function jb(){var A=null;
    try{A=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{A=new ActiveXObject("Microsoft.XMLHTTP")}catch(oc){A=nul l}}if(!A&&typeof XMLHttpRequest!="undefined"){A=new XMLHttpRequest()}return A}

    This function is obviously copyright google, inc., but being presented here for educational purposes only.

    --
    Leonid S. Knyshov
    Find me on Quora :)
  19. Try this: by AEton · · Score: 3, Funny

    Type in g. Then type o. Then type a. Then type t. Aiyeee! I just wanted goat feeding instructions!

    --
    We recently had heard in the office over one of the Yellow Machine that's made by Anthology Solutions.
  20. Re:URL is same, with ?complete=1? by samrolken · · Score: 3, Informative

    This is the same mechanism by which the Gmail application receives its data. It seems like Google has become a big fan of this XMLHTTP object and its Mozilla cousin. It's a great way to give web applications access to live data without requiring a page refresh.

    --
    samrolken