【问题标题】:How to read lucene 4.0 index with java?如何使用 java 读取 lucene 4.0 索引?
【发布时间】:2014-07-17 05:53:19
【问题描述】:

我使用了 Lucene 4.0,但在 Lucene 4.0 版本的 IndexReader 类中找不到“term()”方法。如何阅读索引?请帮忙。我想知道索引文件的内容(词、词频等)。谢谢。

【问题讨论】:

    标签: java lucene


    【解决方案1】:

    我敢打赌,你需要使用http://lucene.apache.org/core/4_0_0/core/org/apache/lucene/index/AtomicReader.html,它有所有需要的方法。

    还可以在这里查看 - http://lucene.apache.org/core/4_0_0/core/org/apache/lucene/index/IndexReader.html - 它向您解释了如何创建所需的阅读器。

    【讨论】:

      猜你喜欢
      • 2011-01-21
      • 2018-07-25
      • 2014-08-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-05
      • 2023-03-21
      相关资源
      最近更新 更多