Why does Lucene cause OOM when indexing large files?

后端 未结 5 585
一向
一向 2021-01-13 05:01

I’m working with Lucene 2.4.0 and the JVM (JDK 1.6.0_07). I’m consistently receiving OutOfMemoryError: Java heap space, when trying to index large text files.<

5条回答
  •  萌比男神i
    2021-01-13 05:45

    Profiling is the only way to determine, such large memory consumption.

    Also, in your code,you are not closing the Filehandlers,Indexreaders,Inderwriters, perhaps the culprit for OOM,

提交回复
热议问题