查找lucene索引中的文档数 [英] Finding the number of documents in a lucene index

查看:164
本文介绍了查找lucene索引中的文档数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Java如何找出lucene索引中的文档数?

Using Java how would you find out the number of documents in an lucene index?

推荐答案

IndexReader包含您需要的方法,特别是,numDocs

IndexReader contains the methods you need, in particular, numDocs

http://lucene.apache.org/core/3_6_0/api/all/org/apache/lucene/index/IndexReader.html#numDocs()

这篇关于查找lucene索引中的文档数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆