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

  • 相关阅读:
    [原]OpenGL基础教程(四)VBO+纹理绘制四边形
    [原]OpenGL基础教程(二)多边形绘制
    [原]OpenGL基础教程(一)多边形绘制
    [原]VS2012编译GLEW 1.11
    [原]pomelo基础知识(一)
    数据挖掘算法之k-means算法
    送上今年微软的一道笔试题
    数据挖掘算法之决策树算法
    编程之美系列03
    编程之美系列02
  • 原文地址:https://www.cnblogs.com/ainima/p/6331358.html
Copyright © 2011-2022 走看看