Trying to convert some Lucene 3 code to Lucene 4,

I want to use termEnums.docs(ir.getLiveDocs()) to only return docs that have not been deleted for a particular term. However getLiveDocs() is only available for AtomicReaders, and although I just have a single index it is file based and uses DirectoryReader (which is a subclass of CompositeReader).

So I guess I could use SlowCompositeReaderWrapper but the name deters me from this, but what I dont understand is that isnt almost everyone using indexes based on the filesystem, isnt almost everyone using CompositeReaders ?

Yet the documentation seems to be implying we should be using AtomicReaders but I dont understand how I could possibly do this with a file based index, maybe if the file based index only had a single segment, but aren't segments created by Lucene as it requires them and not usually closely controlled by the end user application.

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to