To answer the question on a simplistic level: imagine you have a textbook with a keyword index at the back.
Searching a hard disk (naively, at least) is like going through the book, page by page, scanning each line for an occurrence of your keyword.
Using an Internet search engine is like looking up the keyword in the index, and then turning directly to the page number it gives.
In reality of course, it's a lot more complex than this. For example, you would usually search your hard disk for different kinds of information than the Internet. But the basic thing to take away is that the search engine is using an index. It has already gone through the "book", word by word, and it has compiled a list of those words along with where to find them, and it has organised the list in such a way that it can look up things in it very quickly.
For example, think about the organisation of an index in a book. Firstly, it is usually sorted alphabetically, and secondly it may have letter headings. When you look up a word in the index you can see straight away the list of words beginning with the letter you want. And because the list is sorted, it is easy to find the word you want within the list, or to tell quickly if it is missing.
So to summarize, it's like your hard disk just has a book, while the search engine has the index. Though as some others have pointed out, it's possible to use software to index your hard disk, and then you can use the index instead of the whole thing.
99
Have you tried indexing all the files on your drive and searching only the index? Try Everything and see.
– Karan – 2013-04-03T18:53:44.50311Google desktop "used" to do that for windows also... – rogerdpack – 2013-04-03T20:39:16.420
14Google searches through indices stored in RAM, not through files on a hard drive. – Ari – 2013-04-04T01:12:07.987
13The index is important, but Google also uses a map-reduce algorithm to conduct a massively parallel set of operations. No matter how many cores you have in your computer, I guarantee Google has more. – Adam Wuerl – 2013-04-04T03:05:20.333
41There's nothing precluding a desktop search implementation from using indexing. However, remember that Google has enough cash for a) lots of very fast CPUs/servers to parallelise a query; b) lots of very fast RAM to avoid having to access a disk ever; c) lots of hard drives much faster than the one you use; d) lots of very smart engineers to optimize the algorithms involved. (E.g. caching the results for (a lot of) frequently used queries and much much more.) It's not "only" a question of either of these, it's all of these acting in in concert. – millimoose – 2013-04-04T03:14:00.783
No need to turn on Windows Index search use third party tool Everything search http://www.voidtools.com/ this will let you search faster.
– mr_eclair – 2013-04-04T03:41:06.490@Karan: While we're on the topic I'll also mention my own program which is similar to Everything. :)
– user541686 – 2013-04-04T05:33:21.0931If you spent a billion dollars or so making your search as fast as possible ... – David Schwartz – 2013-04-04T06:42:56.280
Arne @Karan has answered you right through the comment, I hope he can make it an answer with more details. That is how Google works for serach for more read this Wiki article.
– avirk – 2013-04-04T08:14:04.027@DavidSchwartz Google has always been very fast. Indeed, their lack in early life is a large contributor, as it forced them to figure out a way of parallelising queries across many machines of varying quality. – Phoshi – 2013-04-04T11:08:12.987
@Antoine Simon's, the one that focuses on indexing above everything else, and leaves the rest to links. It's not wrong as much as painting a woefully incomplete picture of what makes a Google search responsive. – millimoose – 2013-04-04T12:45:46.503
Click the below link you can understand how google search engine works fast. How Search Works
– UdayKiran Pulipati – 2013-04-04T07:00:04.5903@JarrodRoberson: Since Vista, Windows has its own search indexer, which is turned on by default for the personal data folder and works exactly as Spotlight without eating up resources as you claim. By the way, the question is much broader and deeper than your OSX vs. Windows chitchat. – Pincopallino – 2013-04-04T14:08:40.433
3The point is with web content a lot of people are doing the same searches making it worthwhile to predo the work. There is only one of you searching your local computer so putting a lot of resources into indexes is not worth the work. – JamesRyan – 2013-04-04T14:36:49.223
On my linux box, "locate filename" is insanely fast, because it is using an index too. Somehow it seems that neither Apple nor Microsoft's GUI search tools on their desktop OS's can touch my linux box's command line
locate
speeds. – Warren P – 2013-04-05T02:46:18.170The difference between an indexed and unindexed search is the difference between
O(1)
andO(n)
operation. – Lie Ryan – 2013-04-06T07:57:07.573@WarrenP there is a small difference between
locate
and OSX and Windows search utilities.locate
doesn't index the file content, but just the file name. – Pincopallino – 2013-04-07T16:59:25.2531Am I the only one who wishes that inspection of file content was a secondary step in search? I seldom want to search for file content, and would like to opt into it. That my Mac laptop searches first for file contents, and I have to tell it otherwise seems a dumb default. But them, I'm a geek not a typical Mac user. – Warren P – 2013-04-07T20:30:17.637
@LieRyan: Indexing isn't O(1)... – user541686 – 2013-04-08T06:58:52.103
@Mehrdad: creating an index isn't
O(1)
, but searching an index isO(1)
, because it's essentially just a huge hash table. Search engine algorithms though usually aren'tO(1)
because most search queries are composed of multiple words and the merging/reduce results is notO(1)
, also sorting the results are notO(1)
either; fuzzy/phonetic/misspelt search can be madeO(1)
though at the cost of larger index size. – Lie Ryan – 2013-04-10T09:11:46.347@LieRyan: What kind of a hashtable are you thinking of that lets you match arbitrary substrings? – user541686 – 2013-04-10T09:13:51.717
@Mehrdad: no internet search engines let you match arbitrary substrings. – Lie Ryan – 2013-04-10T09:14:23.627
@LieRyan: I thought we're talking about hard drive searches... your reply was right after the Linux comment. – user541686 – 2013-04-10T09:23:33.177
To achieve Google-like search speeds on your desktop, install "Search Everything". It indexes your hard drive and makes you find everything (hence the name) in an instant. – Matthias – 2013-04-12T10:24:03.703
@Karan - is that everything tool safe ? looks like an obscure site and obsure tool to me. – david blaine – 2013-05-07T18:11:34.940
1@davidblaine: It's not open source (yet, although the author has hinted at it) so I can't guarantee anything. That said, it's probably one of the best known indexing utilities for Windows and I personally have been using it on my systems for years. If you could just see the number of deleted answers below where people did nothing except suggest using it like I did... If you want my personal recommendation, as long as you know its limitations (NTFS only, no content indexing etc., see FAQ for more), I think it is great at what it does and I simply love how fast it is! – Karan – 2013-05-07T21:05:00.843
Because a significant portion of the state of Oklahoma is covered with Google data servers. – Daniel R Hicks – 2013-05-18T02:40:45.890