维基百科如何管理数据库中的链接?
How Wikipedia manage links in database?
我搜索了很多网站都没有找到这个问题的答案。
当我们搜索一篇文章时,这篇文章包含很多突出显示的词。当我点击这些词时,另一个网页打开。我想了解维基百科的数据库如何管理所有这些东西,或者换句话说,从数据库的角度来看,不同的网页是如何相互链接的。
维基百科运行于 MediaWiki, and there are a few ways it stores links:
- 每个页面都保存在text table as wikitext, which can include wikitext links (like
[[this]]
) that MediaWiki will parse and render as html hyperlinks。
- 链接也添加到 pagelinks table for easy access via the MediaWiki API and other handy features。
- 外部网站的链接(即维基百科以外的页面)已添加到 externallinks table, and categories are added to the categorylinks table。
我搜索了很多网站都没有找到这个问题的答案。
当我们搜索一篇文章时,这篇文章包含很多突出显示的词。当我点击这些词时,另一个网页打开。我想了解维基百科的数据库如何管理所有这些东西,或者换句话说,从数据库的角度来看,不同的网页是如何相互链接的。
维基百科运行于 MediaWiki, and there are a few ways it stores links:
- 每个页面都保存在text table as wikitext, which can include wikitext links (like
[[this]]
) that MediaWiki will parse and render as html hyperlinks。 - 链接也添加到 pagelinks table for easy access via the MediaWiki API and other handy features。
- 外部网站的链接(即维基百科以外的页面)已添加到 externallinks table, and categories are added to the categorylinks table。