def index(self): """ Index the got pages, include two steps: 1, index the pages for all page information. 2, pageranke the page and also store the scores to accelerate the query process.""" idb = self.config.indexdb odb = self.config.oridb sort = int(self.config.sort) indexer = Indexer(idb) indexer.index(odb) del indexer pr = PageRanker(idb, sort) pr.build_links(odb) pr.pagerank() del pr