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

  • 相关阅读:
    程序员面试中有几大法则
    实现立方体旋转
    为什么技术与产品沟通起来总是那么痛苦
    移动互联网下半场的面试真经,让你进入 BAT 不再是梦
    Javascript+H5实现打小地鼠游戏
    Python多进程应用
    Python数据分析笔记:聚类算法之K均值
    给新手程序员的16个工作必备小妙招,省下时间去LOL吧!
    MySQL数据库开发常见问题及优化
    java中的四种引用类型
  • 原文地址:https://www.cnblogs.com/ainima/p/6331358.html
Copyright © 2011-2022 走看看