安哥网络 发表于 2012-3-5 12:03:38

PyLucene 3.4.0 发布了

PyLucene 3.4.0 发布了,该版本新增一个联合的 contrib 模块,另外使用 JCC 2.11 和 Lucene 3.4.0 源码进行构建。\
PyLucene 是 Python 语言用来访问 Lucene 索引库的封装。通过 PyLucene 可以用来创建索引和对索引进行搜索。
示例说明:
Java 代码:
for (int i = 0; i < hits.length(); i++) {
   Document doc = hits.doc(i);
   System.out.println(hits.score(i) + " : " + doc.get("title"));
}
而 Python 的代码则是:
for hit in hits:
    hit = Hit.cast_(hit)
    print hit.getScore(), ':', hit.getDocument['title']
页: [1]
查看完整版本: PyLucene 3.4.0 发布了