luceneplusplus / LucenePlusPlus

Lucene++ is an up to date C++ port of the popular Java Lucene library, a high-performance, full-featured text search engine.
luceneplusplus@googlegroups.com
Other
738 stars 233 forks source link

Shold define MMapIndexInput file length as int32_t? #156

Closed ThatisOK closed 4 years ago

ThatisOK commented 4 years ago

the range of int32_t is -2147483648~2147483647, that means the max size of a file is 2.14GB. Is this a meaningful limit? or the mmap limit is 2.14G?

if size of a file is larger than 2.14G, it will map fail and throw a FileNotFoundException, is this right?

image

alanw commented 4 years ago

I believe the max shard size is 2^32 so int32_t should be enough