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.

34 of 655 comments (clear)

  1. 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.

  2. Re:Cool! Just like form AutoComplete by Anonymous Coward · · Score: 2, Interesting

    I wonder how long before spammers use this maliciously to create word lists to direct traffic.

  3. My view by bogaboga · · Score: 1, Interesting

    I am very impressed. Very impressed indeed. But what can be done in case one's idea of a term is essentially mis-spelled?

  4. Wow by pHatidic · · Score: 1, Interesting

    That is amazingly fast. What language do you think that menu was programmed in?

    1. 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
  5. Notes by parmadil · · Score: 2, Interesting

    * It works on KHTML-based Safari, so it the crash must be a Konq-specific problem.

    * It ignores, um, non-work-safe input.

    * It works fine on moderately esoteric topics -- I started typing n-s-a-r and it found NSArray, NSArrayController, NSArchiver, etc.

  6. 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]
  7. google whacks by manganese4 · · Score: 2, Interesting

    Well it definitely makes it easier to look for google whacks

    --
    I make my face look like this and concerned words come out.
  8. Re:Great.. by APDent · · Score: 2, Interesting

    Except, if you actually watch the drop-down list as you're typing, once you've typed "nia", it's already suggesting "niagara falls" with the correct spelling and 3,090,000 results. True, "niagra falls" (incorrectly spelled) is also in the list, but since it only has 129,000 results, it's probably clear which one you're actually looking for if you're not trying to make a joke about Viagra.

    This is pretty amazing, really.

  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 :)

  10. I wonder... by Lizard_King · · Score: 2, Interesting

    ... how they prioritize the suggestions in the list. It's definitely not by the number of results per suggestion. Are there any revenue opportunities here for GOOG?

    --
    "My mother never saw the irony in calling me a son-of-a-bitch." - Jack Nicholson
  11. Google suggests wrong spelling as well by witcomb · · Score: 2, Interesting

    I figured I would look up mountain biking. However, in my quick typing I entered mountian instead and it continued and accepted that. It gave me many valid searches, which I probably wouldn't have found if I entered the search string properly. Of course, it did indicate that mountain was spelled incorrectly as normal.

    I figured this could be a useful feature as you probably don't make an effort to misspell your entries, yet many items on the web could have useful information with the misspelled word. So, I entered mount to see the completion, and no mountian, just correctly spelled words.

    I guess we'll just have to continue to misspell everything.

  12. 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
  13. Didn't Microsdoft patent this? by jaal · · Score: 2, Interesting

    I remember long back, one thread on slashdot where it was discussed how microsoft patented the idea of showing the options as the user types in. I am not sure though.

  14. Not like this? by oliverthered · · Score: 2, Interesting

    Konq 3.3.2.
    Try using it for a while and you'll get.

    Using host libthread_db library "/lib/libthread_db.so.1".
    [KCrash handler]
    #7 0x409cfe74 in av_ () from /usr/kde/3.3/lib/libkdecore.so.4
    #8 0x41b6df56 in KJS::XMLHttpRequest::abort ()
    from /usr/kde/3.3/lib/libkhtml.so.4
    #9 0x41b6f333 in KJS::XMLHttpRequestProtoFunc::tryCall ()
    from /usr/kde/3.3/lib/libkhtml.so.4
    #10 0x41aeef77 in KJS::DOMFunction::call () from /usr/kde/3.3/lib/libkhtml.so.4
    #11 0x41c7332b in KJS::Object::call () from /usr/kde/3.3/lib/libkjs.so.1
    #12 0x41c3b09d in KJS::FunctionCallNode::evaluate ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #13 0x41c3f54a in KJS::ExprStatementNode::execute ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #14 0x41c45c16 in KJS::SourceElementsNode::execute ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #15 0x41c3f36d in KJS::BlockNode::execute () from /usr/kde/3.3/lib/libkjs.so.1
    #16 0x41c3f8ce in KJS::IfNode::execute () from /usr/kde/3.3/lib/libkjs.so.1
    #17 0x41c45c16 in KJS::SourceElementsNode::execute ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #18 0x41c3f36d in KJS::BlockNode::execute () from /usr/kde/3.3/lib/libkjs.so.1
    #19 0x41c45143 in KJS::FunctionBodyNode::execute ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #20 0x41c6de0c in KJS::DeclaredFunctionImp::execute ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #21 0x41c6d1bc in KJS::FunctionImp::call () from /usr/kde/3.3/lib/libkjs.so.1
    #22 0x41c7332b in KJS::Object::call () from /usr/kde/3.3/lib/libkjs.so.1
    #23 0x41c3b09d in KJS::FunctionCallNode::evaluate ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #24 0x41c3f54a in KJS::ExprStatementNode::execute ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #25 0x41c45c16 in KJS::SourceElementsNode::execute ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #26 0x41c3f36d in KJS::BlockNode::execute () from /usr/kde/3.3/lib/libkjs.so.1
    #27 0x41c3f8ce in KJS::IfNode::execute () from /usr/kde/3.3/lib/libkjs.so.1
    #28 0x41c45c8c in KJS::SourceElementsNode::execute ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #29 0x41c3f36d in KJS::BlockNode::execute () from /usr/kde/3.3/lib/libkjs.so.1
    #30 0x41c3f8aa in KJS::IfNode::execute () from /usr/kde/3.3/lib/libkjs.so.1
    #31 0x41c45c8c in KJS::SourceElementsNode::execute ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #32 0x41c3f36d in KJS::BlockNode::execute () from /usr/kde/3.3/lib/libkjs.so.1
    #33 0x41c3f8ce in KJS::IfNode::execute () from /usr/kde/3.3/lib/libkjs.so.1
    #34 0x41c45c16 in KJS::SourceElementsNode::execute ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #35 0x41c3f36d in KJS::BlockNode::execute () from /usr/kde/3.3/lib/libkjs.so.1
    #36 0x41c3f8ce in KJS::IfNode::execute () from /usr/kde/3.3/lib/libkjs.so.1
    #37 0x41c45c16 in KJS::SourceElementsNode::execute ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #38 0x41c3f36d in KJS::BlockNode::execute () from /usr/kde/3.3/lib/libkjs.so.1
    #39 0x41c45143 in KJS::FunctionBodyNode::execute ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #40 0x41c6de0c in KJS::DeclaredFunctionImp::execute ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #41 0x41c6d1bc in KJS::FunctionImp::call () from /usr/kde/3.3/lib/libkjs.so.1
    #42 0x41c7332b in KJS::Object::call () from /usr/kde/3.3/lib/libkjs.so.1
    #43 0x41c3b09d in KJS::FunctionCallNode::evaluate ()
    from /usr/kde/3.3/lib/libkjs.so.1
    #44 0x41c3f54a in

    --
    thank God the internet isn't a human right.
  15. Code inspection by Anonymous Coward · · Score: 1, Interesting
    here's the critical code for making this work
    function jb(){
    var A=null;
    try{
    A=new ActiveXObject("Msxml2.XMLHTTP")
    }catch(e){
    try{
    A=new ActiveXObject("Microsoft.XMLHTTP")
    }catch(oc){
    A=null
    }
    }
    if(!A&&typeof XMLHttpRequest!="undefined"){
    A=new XMLHttpRequest()
    }
    return A
    }
    the xml request is then sent from an iframe i believe: http://www.google.com/ac.js and the response shown in a floating div.
  16. Re:Is it any coincidence by Haydn+Fenton · · Score: 2, Interesting

    Haha. What's also cool is 'f' gives 'Firefox' as the first suggestion, it must be making a big impact.

  17. Re:Is it any coincidence by oiarbovnb · · Score: 2, Interesting

    amazon best buy cnn dictionary ebay firefox games hotmail ikea jokes kazaa lyrics mapquest news online dictionary paris hilton quotes recipes spybot tara reid (who is that?) ups verizon weather xbox yahoo zipcodes

  18. 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

  19. 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?

  20. Re:Is it any coincidence by kzinti · · Score: 2, Interesting

    There are some other interesting first-suggestions in the alphabet: h suggests "hotmail", and x suggests "x-box" (not, as I was expecting, a porn term). d suggests "dictionary", and o suggests "online dictionary". Most surprising: f suggests "firefox", where the top hit is mozilla.org.

  21. 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

  22. 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.
  23. Re:Google starts to suck by tesmako · · Score: 2, Interesting
    Take for instance Microsoft. Ten years ago it was the icon of geekhood, they made a really good compiler, assembler and whatnot.

    What? Are you trying to rewrite history in some way? I would say that the acceptance of Microsoft products have never really been higher than it is today. All OS's they had before 2k were disgraces. XP is popular and far from the resource hog slashdotters like to pretend that it is (have a look at any other desktop environment), in fact the system requirement leap between 2k and XP was far smaller than many jumps before when factoring in the progress of hardware. I don't see anything wrong with the current development tools that Microsoft has either (in fact, they too sure seem to be better today than they have ever before been).

    Really, the last five years of Microsoft products have done a lot to convince me that MS knows what they are doing, Linux seems further from being able to conquer the desktop market today than it did in 1999.

  24. No sex by petteri_666 · · Score: 2, Interesting

    Try searching with sex, porn etc. no results. It is in some safety mode or what?

  25. Re:/. Spelling by Tatarize · · Score: 2, Interesting

    I was going for "Pretty" but after I got "pret" in there it started suggesting preteen girls and such.

    I'd hate to see it if it wasn't striking down entries. For example "sex" comes up with total blanks. No "sex addition" or anything, so its obviously removing stuff but apparently not flawlessly.

    Reminds me a great google game. Turn strict search filtering on on google images and try and find porn using single word. My record is 2nd image with "cameltoe".

    --

    It is no longer uncommon to be uncommon.
  26. Re:Cool! Just like form AutoComplete by pigscanfly.ca · · Score: 2, Interesting

    You seem to be abusing big O notation a bit my friend.
    You cant say O(n) best case , since it O(n) is a bounding above by a function. What your looking to say is that the algorithm is O(n^2) and Omega(n)

  27. Re:Implementation details by K-Man · · Score: 2, Interesting
    Here's the url it uses to populate the drop-down:

    http://www.google.com/complete/search?hl=en&js=tru e&qu=chicken.

    You can substitute any string for "chicken", and hl is the language.

    --
    ---- "If we have to go on with these damned quantum jumps, then I'm sorry that I ever got involved" - Erwin Schrodinger
  28. Re:Cool! Just like form AutoComplete by downbad · · Score: 2, Interesting

    i find it amusing that this is faster than Mozilla's autocomplete on my system.

  29. Re:Cool! Just like form AutoComplete by Have+Blue · · Score: 2, Interesting

    Or better, "can be found on the Internet in text form". The image search is nowhere near as comprehensive or accurate, and not even Google is attempting sound or video search yet.