by a text-based search engine,such as images,programs,and databases.This makes it possible to return web pages which have not actually been crawled.Note that pages that have not been crawled can cause problems,since they are never checked for validity before being returned to the user.In this case,the search engine can even return a page that never actually existed,but had hyperlinks pointing to it.However,it is possible to sort the results,so that this particular problem rarely happens. This idea of propagating anchor text to the page it refers to was implemented in the World Wide Web Worm McBryan 94]especially because it helps search non- text information,and expands the search coverage with fewer downloaded documents.We use anchor propagation mostly because anchor text can help provide better quality results.Using anchor text efficiently is technically difficult because of the large amounts of data which must be processed.In our current crawl of 24 million pages,we had over 259 million anchors which we indexed. 2.3 Other Features Aside from PageRank and the use of anchor text,Google has several other features.First,it has location information for all hits and so it makes extensive use of proximity in search.Second,Google keeps track of some visual presentation details such as font size of words.Words in a larger or bolder font are weighted higher than other words.Third,full raw HTML of pages is available in a repository. 3 Related Work Search research on the web has a short and concise history.The World Wide Web Worm (WWWW)[McBryan 94]was one of the first web search engines.It was subsequently followed by several other academic search engines,many of which are now public companies.Compared to the growth of the Web and the importance of search engines there are precious few documents about recent search engines [Pinkerton 94.According to Michael Mauldin(chief scientist,Lycos Inc)[Mauldinl "the various services(including Lycos)closely guard the details of these databases".However,there has been a fair amount of work on specific features of search engines.Especially well represented is work which can get results by post-processing the results of existing commercial search engines,or produce small scale"individualized"search engines.Finally,there has been a lot of research on information retrieval systems,especially on well controlled collections. In the next two sections,we discuss some areas where this research needs to be extended to work better on the web. 3.1 Information Retrieval Work in information retrieval systems goes back many years and is well developed [Witten 94.However,most of the research on information retrieval systems is on small well controlled homogeneous collections such as collections of scientific papers or news stories on a related topic.Indeed,the primary benchmark for http://www7.scu.edu.au/programme/fullpapers/1921/com1921.htm 6
The text of links is treated in a special way in our search engine. Most search engines associate the text of a link with the page that the link is on. In addition, we associate it with the page the link points to. This has several advantages. First, anchors often provide more accurate descriptions of web pages than the pages themselves. Second, anchors may exist for documents which cannot be indexed by a text-based search engine, such as images, programs, and databases. This makes it possible to return web pages which have not actually been crawled. Note that pages that have not been crawled can cause problems, since they are never checked for validity before being returned to the user. In this case, the search engine can even return a page that never actually existed, but had hyperlinks pointing to it. However, it is possible to sort the results, so that this particular problem rarely happens. This idea of propagating anchor text to the page it refers to was implemented in the World Wide Web Worm [McBryan 94] especially because it helps search nontext information, and expands the search coverage with fewer downloaded documents. We use anchor propagation mostly because anchor text can help provide better quality results. Using anchor text efficiently is technically difficult because of the large amounts of data which must be processed. In our current crawl of 24 million pages, we had over 259 million anchors which we indexed. 2.3 Other Features Aside from PageRank and the use of anchor text, Google has several other features. First, it has location information for all hits and so it makes extensive use of proximity in search. Second, Google keeps track of some visual presentation details such as font size of words. Words in a larger or bolder font are weighted higher than other words. Third, full raw HTML of pages is available in a repository. 3 Related Work Search research on the web has a short and concise history. The World Wide Web Worm (WWWW) [McBryan 94] was one of the first web search engines. It was subsequently followed by several other academic search engines, many of which are now public companies. Compared to the growth of the Web and the importance of search engines there are precious few documents about recent search engines [Pinkerton 94]. According to Michael Mauldin (chief scientist, Lycos Inc) [Mauldin], "the various services (including Lycos) closely guard the details of these databases". However, there has been a fair amount of work on specific features of search engines. Especially well represented is work which can get results by post-processing the results of existing commercial search engines, or produce small scale "individualized" search engines. Finally, there has been a lot of research on information retrieval systems, especially on well controlled collections. In the next two sections, we discuss some areas where this research needs to be extended to work better on the web. 3.1 Information Retrieval Work in information retrieval systems goes back many years and is well developed [Witten 94]. However, most of the research on information retrieval systems is on small well controlled homogeneous collections such as collections of scientific papers or news stories on a related topic. Indeed, the primary benchmark for information retrieval, the Text Retrieval Conference [TREC 96], uses a fairly small, well controlled collection for their benchmarks. The "Very Large Corpus" benchmark is only 20GB compared to the 147GB from our crawl of 24 million web pages. Things that work well on TREC often do not produce good results on the web. For example, the standard vector space model tries to return the document that most closely approximates the query, given that both query and document are vectors defined by their word occurrence. On the web, this strategy often returns very short documents that are the query plus a few words. For example, we have seen a major search engine return a page containing only "Bill Clinton Sucks" and picture from a "Bill Clinton" query. Some argue that on the web, users should specify more accurately what they want and add more words to their query. We disagree vehemently with this position. If a user issues a query like "Bill Clinton" they should get reasonable results since there is a enormous amount of high quality information available on this topic. Given examples like these, we believe that the standard information retrieval work needs to be extended to deal effectively with the web. http://www7.scu.edu.au/programme/fullpapers/1921/com1921.htm 6
information retrieval,the Text Retrieval Conference IREC 96],uses a fairly small, well controlled collection for their benchmarks.The "Very Large Corpus" benchmark is only 20GB compared to the 147GB from our crawl of 24 million web pages.Things that work well on TREC often do not produce good results on the web.For example,the standard vector space model tries to return the document that most closely approximates the query,given that both query and document are vectors defined by their word occurrence.On the web,this strategy often returns very short documents that are the query plus a few words.For example, we have seen a major search engine return a page containing only "Bill Clinton Sucks"and picture from a "Bill Clinton"query.Some argue that on the web,users should specify more accurately what they want and add more words to their query.We disagree vehemently with this position.If a user issues a query like"Bill Clinton"they should get reasonable results since there is a enormous amount of high quality information available on this topic.Given examples like these,we believe that the standard information retrieval work needs to be extended to deal effectively with the web. 3.2 Differences Between the Web and Well Controlled Collections The web is a vast collection of completely uncontrolled heterogeneous documents.Documents on the web have extreme variation internal to the documents,and also in the external meta information that might be available.For example,documents differ internally in their language(both human and programming),vocabulary(email addresses,links,zip codes,phone numbers, product numbers),type or format(text,HTML,PDF,images,sounds),and may even be machine generated (log files or output from a database).On the other hand,we define external meta information as information that can be inferred about a document,but is not contained within it.Examples of external meta information include things like reputation of the source,update frequency,quality,popularity or usage,and citations.Not only are the possible sources of external meta information varied,but the things that are being measured vary many orders of magnitude as well.For example,compare the usage information from a major homepage,like Yahoo's which currently receives millions of page views every day with an obscure historical article which might receive one view every ten years. Clearly,these two items must be treated very differently by a search engine. Another big difference between the web and traditional well controlled collections is that there is virtually no control over what people can put on the web.Couple this flexibility to publish anything with the enormous influence of search engines to route traffic and companies which deliberately manipulating search engines for profit become a serious problem.This problem that has not been addressed in traditional closed information retrieval systems.Also,it is interesting to note that metadata efforts have largely failed with web search engines,because any text on the page which is not directly represented to the user is abused to manipulate search engines.There are even numerous companies which specialize in manipulating search engines for profit. http://www7.scu.edu.au/programme/fullpapers/1921/com1921.htm 7
]. However, most of the research on information retrieval systems is on small well controlled homogeneous collections such as collections of scientific papers or news stories on a related topic. Indeed, the primary benchmark for information retrieval, the Text Retrieval Conference [TREC 96], uses a fairly small, well controlled collection for their benchmarks. The "Very Large Corpus" benchmark is only 20GB compared to the 147GB from our crawl of 24 million web pages. Things that work well on TREC often do not produce good results on the web. For example, the standard vector space model tries to return the document that most closely approximates the query, given that both query and document are vectors defined by their word occurrence. On the web, this strategy often returns very short documents that are the query plus a few words. For example, we have seen a major search engine return a page containing only "Bill Clinton Sucks" and picture from a "Bill Clinton" query. Some argue that on the web, users should specify more accurately what they want and add more words to their query. We disagree vehemently with this position. If a user issues a query like "Bill Clinton" they should get reasonable results since there is a enormous amount of high quality information available on this topic. Given examples like these, we believe that the standard information retrieval work needs to be extended to deal effectively with the web. 3.2 Differences Between the Web and Well Controlled Collections The web is a vast collection of completely uncontrolled heterogeneous documents. Documents on the web have extreme variation internal to the documents, and also in the external meta information that might be available. For example, documents differ internally in their language (both human and programming), vocabulary (email addresses, links, zip codes, phone numbers, product numbers), type or format (text, HTML, PDF, images, sounds), and may even be machine generated (log files or output from a database). On the other hand, we define external meta information as information that can be inferred about a document, but is not contained within it. Examples of external meta information include things like reputation of the source, update frequency, quality, popularity or usage, and citations. Not only are the possible sources of external meta information varied, but the things that are being measured vary many orders of magnitude as well. For example, compare the usage information from a major homepage, like Yahoo's which currently receives millions of page views every day with an obscure historical article which might receive one view every ten years. Clearly, these two items must be treated very differently by a search engine. Another big difference between the web and traditional well controlled collections is that there is virtually no control over what people can put on the web. Couple this flexibility to publish anything with the enormous influence of search engines to route traffic and companies which deliberately manipulating search engines for profit become a serious problem. This problem that has not been addressed in traditional closed information retrieval systems. Also, it is interesting to note that metadata efforts have largely failed with web search engines, because any text on the page which is not directly represented to the user is abused to manipulate search engines. There are even numerous companies which specialize in manipulating search engines for profit. http://www7.scu.edu.au/programme/fullpapers/1921/com1921.htm 7
manipulating search engines for profit. 4 System Anatomy First,we will provide a high level discussion of the architecture.Then,there is some in-depth descriptions of important data structures.Finally,the major applications: crawling,indexing,and searching will be examined in depth. Crawler 4.1 Google Architecture URL Server Store Server Overview In this section,we will give a high level overview of how the Repository whole system works as pictured in Figure 1.Further URL Resolver Indexer sections will discuss the applications and data structures not mentioned in this section.Most of Google is arrel Lexicon implemented in C or C++for efficiency and can run in either Links Solaris or Linux. Doc Sorter In Google,the web crawling Index (downloading of web pages)is done by several distributed Pagerank crawlers.There is a URLserver Searcher that sends lists of URLs to be fetched to the crawlers.The web pages that are fetched are Figure 1.High Level Googe Architecture then sent to the storeserver. The storeserver then compresses and stores the web pages into a repository.Every web page has an associated ID number called a doclD which is assigned whenever a new URL is parsed out of a web page.The indexing function is performed by the indexer and the sorter.The indexer performs a number of functions.It reads the repository, uncompresses the documents,and parses them.Each document is converted into a set of word occurrences called hits.The hits record the word,position in document,an approximation of font size,and capitalization.The indexer distributes these hits into a set of "barrels",creating a partially sorted forward index.The indexer performs another important function.It parses out all the links in every web page and stores important information about them in an anchors file. This file contains enough information to determine where each link points from and to,and the text of the link. The URLresolver reads the anchors file and converts relative URLs into absolute http://www7.scu.edu.au/programme/fullpapers/1921/com1921.htm 8
Another big difference between the web and traditional well controlled collections is that there is virtually no control over what people can put on the web. Couple this flexibility to publish anything with the enormous influence of search engines to route traffic and companies which deliberately manipulating search engines for profit become a serious problem. This problem that has not been addressed in traditional closed information retrieval systems. Also, it is interesting to note that metadata efforts have largely failed with web search engines, because any text on the page which is not directly represented to the user is abused to manipulate search engines. There are even numerous companies which specialize in manipulating search engines for profit. 4 System Anatomy First, we will provide a high level discussion of the architecture. Then, there is some in-depth descriptions of important data structures. Finally, the major applications: crawling, indexing, and searching will be examined in depth. Figure 1. High Level Google Architecture 4.1 Google Architecture Overview In this section, we will give a high level overview of how the whole system works as pictured in Figure 1. Further sections will discuss the applications and data structures not mentioned in this section. Most of Google is implemented in C or C++ for efficiency and can run in either Solaris or Linux. In Google, the web crawling (downloading of web pages) is done by several distributed crawlers. There is a URLserver that sends lists of URLs to be fetched to the crawlers. The web pages that are fetched are then sent to the storeserver. The storeserver then compresses and stores the web pages into a repository. Every web page has an associated ID number called a docID which is assigned whenever a new URL is parsed out of a web page. The indexing function is performed by the indexer and the sorter. The indexer performs a number of functions. It reads the repository, uncompresses the documents, and parses them. Each document is converted into a set of word occurrences called hits. The hits record the word, position in document, an approximation of font size, and capitalization. The indexer distributes these hits into a set of "barrels", creating a partially sorted forward index. The indexer performs another important function. It parses out all the links in every web page and stores important information about them in an anchors file. This file contains enough information to determine where each link points from and to, and the text of the link. The URLresolver reads the anchors file and converts relative URLs into absolute URLs and in turn into docIDs. It puts the anchor text into the forward index, associated with the docID that the anchor points to. It also generates a database of links which are pairs of docIDs. The links database is used to compute PageRanks for all the documents. http://www7.scu.edu.au/programme/fullpapers/1921/com1921.htm 8
The URLresolver reads the anchors file and converts relative URLs into absolute URLs and in turn into doclDs.It puts the anchor text into the forward index, associated with the doclD that the anchor points to.It also generates a database of links which are pairs of doclDs.The links database is used to compute PageRanks for all the documents. The sorter takes the barrels,which are sorted by doclD(this is a simplification,see Section 4.2.5,and resorts them by wordID to generate the inverted index.This is done in place so that little temporary space is needed for this operation.The sorter also produces a list of wordIDs and offsets into the inverted index.A program called DumpLexicon takes this list together with the lexicon produced by the indexer and generates a new lexicon to be used by the searcher.The searcher is run by a web server and uses the lexicon built by DumpLexicon together with the inverted index and the PageRanks to answer queries. 4.2 Major Data Structures Google's data structures are optimized so that a large document collection can be crawled,indexed,and searched with little cost.Although,CPUs and bulk input output rates have improved dramatically over the years,a disk seek still requires about 10 ms to complete.Google is designed to avoid disk seeks whenever possible,and this has had a considerable influence on the design of the data structures. 4.2.1 BigFiles BigFiles are virtual files spanning multiple file systems and are addressable by 64 bit integers.The allocation among multiple file systems is handled automatically.The BigFiles package also handles allocation and deallocation of file descriptors,since the operating systems do not provide enough for our needs.BigFiles also support rudimentary compression options. 4.2.2 Repository The repository contains the full Repository:53.5 GB=147.8 GB uncompressed HTML of every web page.Each page is compressed using zlib(see sync length compressed packet sync length compressed packet RFC1950.The choice of compression technique is a Packet(stored compressed in repository) tradeoff between speed and docid ecode urllen pagelen url page compression ratio.We chose zlib's speed over a significant improvement in compression Figure 2.Repository Data Structure offered by bzip.The compression rate of bzip was approximately 4 to 1 on the repository as compared to zlib's 3 to 1 compression.In the repository,the documents are stored one after the other and are prefixed by doclD,lenath,and URL as can be seen in Fiqure 2.The repository http://www7.scu.edu.au/programme/fullpapers/1921/com1921.htm 9
The URLresolver reads the anchors file and converts relative URLs into absolute URLs and in turn into docIDs. It puts the anchor text into the forward index, associated with the docID that the anchor points to. It also generates a database of links which are pairs of docIDs. The links database is used to compute PageRanks for all the documents. The sorter takes the barrels, which are sorted by docID (this is a simplification, see Section 4.2.5), and resorts them by wordID to generate the inverted index. This is done in place so that little temporary space is needed for this operation. The sorter also produces a list of wordIDs and offsets into the inverted index. A program called DumpLexicon takes this list together with the lexicon produced by the indexer and generates a new lexicon to be used by the searcher. The searcher is run by a web server and uses the lexicon built by DumpLexicon together with the inverted index and the PageRanks to answer queries. 4.2 Major Data Structures Google's data structures are optimized so that a large document collection can be crawled, indexed, and searched with little cost. Although, CPUs and bulk input output rates have improved dramatically over the years, a disk seek still requires about 10 ms to complete. Google is designed to avoid disk seeks whenever possible, and this has had a considerable influence on the design of the data structures. 4.2.1 BigFiles BigFiles are virtual files spanning multiple file systems and are addressable by 64 bit integers. The allocation among multiple file systems is handled automatically. The BigFiles package also handles allocation and deallocation of file descriptors, since the operating systems do not provide enough for our needs. BigFiles also support rudimentary compression options. 4.2.2 Repository Figure 2. Repository Data Structure The repository contains the full HTML of every web page. Each page is compressed using zlib (see RFC1950). The choice of compression technique is a tradeoff between speed and compression ratio. We chose zlib's speed over a significant improvement in compression offered by bzip. The compression rate of bzip was approximately 4 to 1 on the repository as compared to zlib's 3 to 1 compression. In the repository, the documents are stored one after the other and are prefixed by docID, length, and URL as can be seen in Figure 2. The repository requires no other data structures to be used in order to access it. This helps with data consistency and makes development much easier; we can rebuild all the other data structures from only the repository and a file which lists crawler errors. http://www7.scu.edu.au/programme/fullpapers/1921/com1921.htm 9