When using Lucene to build an index, there is a memory overflow due to the large size of the IndexWriter object.

when using Lucene to build an index, the IndexWriter object is too large to lead to memory overflow, but my IndexWriter has been created by declaring temporary variables, but after each execution of the IndexWriter.addDocument () method, the size of the object will accumulate on the size of the previously established index, and because of the large amount of data, the IndexWriter object is getting bigger and bigger.


IndexWriter has a commit method to submit and empty cached data.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32add-341fd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32add-341fd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?