The Anatomy of a Large-Scale Hypertextual Web Search Engine | Brin and Page, 1998
"It makes especially heavy use of the additional structure present in hypertext to provide much higher quality search results." (1)
Scaling
1994: 110.000 web pages and documents in Word Wide Web Worm (WWWW) search engine. This enginge received 1500 queries per day.
1997: est. 2 million (WebCrawler) to 100 million web documents Altavista in 1997: 20 million queries per day.
Est. 2000: perhaps a billion web pages and hundreds of millions of queries per day.
Goal of Google is to scale with these numbers.
"Google is designed to scale well to extremely large data sets. It makes efficient use of storage space to store the index. Its data structures are optimized for fast and efficient access (see section 4.2). Further, we expect that the cost to index and store text or HTML will eventually decline relative to the amount that will be available (see Appendix B). This will result in favorable scaling properties for centralized systems like Google." (2)
Q: How do they get these numbers?
E.g. Moore's law? Double computer power every two years?
Google aims to improve the quality of search results: does not only mean completeness. Balance precision against recall.
Size of the crawl from Google at the time of the paper: 147GB from our crawl of 24 million web pages.
System features: how to get high precision?
PageRank: leverage link structure of the web
Measure of citation importance: more citations / backlinks to the website? -> more important.
1) PageRank does not count links for all pages equally * Citation from important website, more influence 2) Normalize by number of links on page
"PageRank can be thought of as a model of user behavior. We assume there is a "random surfer" who is given a web page at random and keeps clicking on links, never hitting "back" but eventually gets bored and starts on another random page. The probability that the random surfer visits a page is its PageRank. And, the d damping factor is the probability at each page the "random surfer" will get bored and request another random page. One important variation is to only add the damping factor d to a single page, or a group of pages. This allows for personalization and can make it nearly impossible to deliberately mislead the system in order to get a higher ranking. We have several other extensions to PageRank, again see [Page 98]. Another intuitive justification is that a page can have a high PageRank if there are many pages that point to it, or if there are some pages that point to it and have a high PageRank. Intuitively, pages that are well cited from many places around the web are worth looking at. Also, pages that have perhaps only one citation from something like the Yahoo! homepage are also generally worth looking at. If a page was not high quality, or was a broken link, it is quite likely that Yahoo’s homepage would not link to it. PageRank handles both these cases and everything in between by recursively propagating weights through the link structure of the web"
Using Anchor Texts
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.
System anatomy
Google Architecture
1) URLserver sends list of URLs to crawlers 2) several distributed web crawlers 3) sends to storeserver 4) compresses and stores web pages in repository 5) Every webpage has an docID that is assigned to each parsed URL. 6) Indexing by indexer and sorter * Reads repo * Uncompresses documents * Parses documents 7) Each document translated into set of word occurrence called hits. 8) A hit records word, position in doc, approximation of font size,capitalization 9) Indexer distributes hits into a set of "barrels": a Partially sorted forward index. 10) Indexer also parses links on web pages and stores important info in an anchors file * anchors file contains info on where each link points to and from where, and the text of the link. 11) URLresolver reads anchor files and convert relURLs to absolute URLs, and then converts them to docIDs. 12) URLresolver puts anchor text in the forward index, associated with the docID that the anchor pointed to. 13) URLresolver also generated database of links which are pairs of docIDs, used by PageRank. 14) Sorter takes barrels sorted by docID and re-sorts them by WordID to generate the inverted index. * This is done in-place to avoid extra space need. 15) The sorter also produces a list of wordIDs and offsets into the inverted index. (What does this mean?)) 16) DumpLexicon program takes both this list with wordID links to the inverted index, and the lexeicon produced by the indexer (do they mean the list of hits?) --> to generate a new lexicon for the searcher.
Query?: DumpLexicon lexicon + inverted index + PageRank.
Data structures
"BigFiles are virtual files spanning multiple file systems and are addressable by 64 bit integers." (8). With automatic allocation.
--> Fore-runner of distributed file systems such as HDFS.
Document index: "document index keeps information about each document. It is a fixed width ISAM (Index sequential access mode) index, ordered by docID. The information stored in each entry includes the current document status, a pointer into the repository, a document checksum, and various statistics"
Lexicon: "One important change from earlier systems is that the lexicon can fit in memory for a reasonable price. In the current implementation we can keep the lexicon in memory on a machine with 256 MB of main memory. The current lexicon contains 14 million words (though some rare words were not added to the lexicon). It is implemented in two parts -- a list of the words (concatenated together but separated by nulls) and a hash table of pointers."
Hit lists: "A hit list corresponds to a list of occurrences of a particular word in a particular document including position, font, and capitalization information. Hit lists account for most of the space used in both the forward and the inverted indices. Because of this, it is important to represent them as efficiently as possible. We considered several alternatives for encoding position, font, and capitalization -- simple encoding (a triple of integers), a compact encoding (a hand optimized allocation of bits), and Huffman coding. In the end we chose a hand optimized compact encoding since it required far less space than the simple encoding and far less bit manipulation than Huffman coding."
Forward Index
Stored in 64 "Barrels" that are already partially sorted.
- Each barrel holds a range of wordIDs.
- If a new document is indexed, Google checks if the wordIDs from that index fall in an index range of one of the barrels.
- If so, that docID is recorded in that barrel together with a list of wordIDs with hitlists that correspond to those words.
Reminder Hit list: all word occurrences for one single particular document.
So basically forward indices map from docIDs to a list of wordIDs contained in the document with that docID.
Inverted index
Forward index as sorted by the sorter.
Each wordID in the lexicon has a pointer to the barrel that wordID falls into. This allows calculation of a doclist of docIDs with corresponding hit lists.
So basically a mapping from wordID to all documents that word occurs in.
How is the inverted index useful for querying?:
An important issue is in what order the docID’s should appear in the doclist. One simple solution is to store them sorted by docID. This allows for quick merging of different doclists for multiple word queries. Another option is to store them sorted by a ranking of the occurrence of the word in each document. This makes answering one word queries trivial and makes it likely that the answers to multiple word queries are near the start. However, merging is much more difficult. Also, this makes development much more difficult in that a change to the ranking function requires a rebuild of the index. We chose a compromise between these options, keeping two sets of inverted barrels -- one set for hit lists which include title or anchor hits and another set for all hit lists. This way, we check the first set of barrels first and if there are not enough matches within those barrels we check the larger ones.
Summary options:
1) sort by docIDs
* When multiple words are in a query, you can merge the corresponding doc lists easier because they are sorted already.
2) sort by ranking of query word
* So the first doc in doc list has the query word and a corresponding high importance ranking.
* Then one-word queries are trivial and increases relevance
* Technically difficult
Searching
General outline:
"First, consider the simplest case -- a single word query. In order to rank a document with a single word query, Google looks at that document’s hit list for that word."
"For a multi-word search, the situation is more complicated. Now multiple hit lists must be scanned through at once so that hits occurring close together in a document are weighted higher than hits occurring far apart. The hits from the multiple hit lists are matched up so that nearby hits are matched together. For every matched set of hits, a proximity is computed."
Storage and performance
"More importantly, the total of all the data used by the search engine requires a comparable amount of storage, about 55 GB. Furthermore, most queries can be answered using just the short inverted index. With better encoding and compression of the Document Index, a high quality web search engine may fit onto a 7GB drive of a new PC."
Brief summary statistics:
Total storage with compressed repo: 108GB
24 million web pages fetched, 76.5 million URLs seen.
Scalability
"Google’s major data structures make efficient use of available storage space. Furthermore, the crawling, indexing, and sorting operations are efficient enough to be able to build an index of a substantial portion of the web -- 24 million pages, in less than one week. We expect to be able to build an index of 100 million pages in less than a month."
Beyond that limit they expect to hit limits in e.g. addressable memory of OS systems.
Using Moore's Law:
Also, it is likely that soon we will have speech recognition that does a reasonable job converting speech into text, expanding the amount of text available. All of this provides amazing possibilities for centralized indexing. Here is an illustrative example. We assume we want to index everything everyone in the US has written for a year. We assume that there are 250 million people in the US and they write an average of 10k per day. That works out to be about 850 terabytes. Also assume that indexing a terabyte can be done now for a reasonable cost. We also assume that the indexing methods used over the text are linear, or nearly linear in their complexity. Given all these assumptions we can compute how long it would take before we could index our 850 terabytes for a reasonable cost assuming certain growth factors. Moore’s Law was defined in 1965 as a doubling every 18 months in processor power. It has held remarkably true, not just for processors, but for other important system parameters such as disk as well. If we assume that Moore’s law holds for the future, we need only 10 more doublings, or 15 years to reach our goal of indexing everything everyone in the US has written for a year for a price that a small company could afford.
Moore's Law: doubling every 18 months, assumed to hold not only for processing power but also available disk space (for the same price)