lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <>
Subject Re: docid is just a signed int32
Date Thu, 18 Aug 2016 13:55:27 GMT
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 <> 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?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message