No, IndexWriter enforces that the number of documents cannot go over IndexWriter.MAX_DOCS (which is a bit less than 2^31) and BaseCompositeReader computes the number of documents in a long variable and ensures it is less than 2^31, so you cannot have indexes that contain more than 2^31 documents.
Larger collections should be written to multiple shards and use TopDocs.merge to merge results. Le jeu. 18 août 2016 à 15:38, Cristian Lorenzetto < cristian.lorenze...@gmail.com> a écrit : > docid is a signed int32 so it is not so big, but really docid seams not a > primary key unmodifiable but a temporary id for the view related to a > specific search. > > So repository can contains more than 2^31 documents. > > My deduction is correct ? is there a maximum size for lucene index? >