2010年6月4日星期五

开始学习xapian了,记录一下

既然要学习xapian,当然要知道在什么地方下载xapian了。

http://xapian.org/download

下载地址如上:

Adding this PPA to your system

You can update your system with unsupported packages from this untrusted PPA by adding ppa:xapian-backports/ppa to your system's Software Sources. (Read about installing)

Technical details about this PPA

This PPA can be added to your system manually by copying the lines below and adding them to your system's software sources.

Display sources.list entries for: ubuntu 10.4 lucid
  deb http://ppa.launchpad.net/xapian-backports/ppa/ubuntu lucid main  deb-src http://ppa.launchpad.net/xapian-backports/ppa/ubuntu lucid main 
Signing key:
1024R/A0735AD0 (What is this?)
Fingerprint:
3172410B048C8FFCBEC377962A73995FA0735AD0

这里有一篇文章:

Xapian VS PyLucene

今天初步比较了一下xapian和pylucene

  • 将大约10万条数据分别用xapian和pylucene建立索引,然后再分别搜索相同的词。 建立索引的时间,xapian和pylucene用的时间差不多,感觉上xapian略快一点。

    在索引文件的大小上,xapian的索引文件是pylucene的十倍多,原因可能是我自己写的分词模块造成的,分词是这样的“大家好,这是一个测试”分 别为"大 大家 家 家好 这 这是 是 是一 一 一个 个 个测 测 测试”这样可能造成了很多垃圾关键词。而pylucene 使用的是PyLucene.ChineseAnalyzerPyLucene的分词应该比我的更科学。 索引建立好以后,进行搜索,搜索同样一个词,xapian的搜索速度是pylucene的几百倍,pylucene用0.227505922318秒,xapian用了0.000517129898071秒。 看来搜索效率上,xapain确实比pylucene快一些。 这只是一个简单的比较,可能很多地方并不是很科学,所以,也并不能说明什么问题。

    来源:http://wiki.woodpecker.org.cn/moin/XapianVsPyLucene


    看来还是xapian强一些!


没有评论:

发表评论