研究搜索引擎的高手和lucene的高手 请进 立刻给分LUCENE进行全文搜索,搜索结果生成全文所略,可是生成的所略内容太多如何才能取,其中关键字出现频率最高的50个字。类似GOOGLE或百度那样

解决方案 »

  1.   

    I suppose you can get them in highlighting job.
    Store all the text in the document's field.And use Highlighter.getBestFragment() to get what you want.
    Remember calling Highlighter.setTextFragmenter(new SimpleFragmenter(50)) first,it would restrict the return words' length into 50.
      

  2.   

    lucene默认就是按相关度排序的. 但是百度和Google并不是单纯按相关度排序, 百度有超链分析,Google有PageRank
      

  3.   

    其实可以自己做索引来解决这个问题,
    http://www.blogjava.net/sunfruit/archive/2006/04/05/39276.html自己做索引可以可以根据字索引的大小获得排序结果
      

  4.   

    lucene默认就是按相关度排序的. 但是百度和Google并不是单纯按相关度排序, 百度有超链分析,Google有PageRank