Get Term frequency in Lucene using Zend Framework

I use Zend Framework to provide a PHP version Lucene. Currently, Zned should be the best PHP wrapper for Java Lucene.

Create a Zend_Search_Lucene , using the method termFreqs to get the term frequecy for a specific term. There is no implementation in Zend for Java method like termDocs , which provides a Term    =>    <docNum, freq>*.

So now I have to iterate all terms for figure out the frequency. But better for nothing :)

 

Sample code to get term frequency:

Sample code to crate index:

Sample code to search index

posted on 2009-10-12 07:53  爱你一万年123  阅读(114)  评论(0)    收藏  举报

导航