zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    3185 队列练习 1 3186 队列练习 2
    1063 合并果子
    堆排序
    奇怪的电梯
    3411 洪水
    2010 求后序遍历
    1729 单词查找树
    3137 栈练习1
    2821 天使之城
    括弧匹配检验(check.cpp)
  • 原文地址:https://www.cnblogs.com/ainima/p/6331358.html
Copyright © 2011-2022 走看看