Is it possible to iterate through documents stored in Lucene Index?

前端 未结 5 1469
栀梦
栀梦 2020-11-29 05:29

I have some documents stored in a Lucene index with a docId field. I want to get all docIds stored in the index. There is also a problem. Number of documents is about 300 00

5条回答
  •  佛祖请我去吃肉
    2020-11-29 06:04

    Lucene 4

    Bits liveDocs = MultiFields.getLiveDocs(reader);
    for (int i=0; i

    See LUCENE-2600 on this page for details: https://lucene.apache.org/core/4_0_0/MIGRATE.html

提交回复
热议问题