one thing that has been quite painful during Lucene's use process is that the optimize method occupies a large amount of system resources (say "exclusive" is not enough ), A 4G + index of 0.29 million pieces of data, optimize on my laptop for up to 32 minutes, during which I can almost only work on desktops. Unfortunately, at least I haven't found a way to control the CPU usage of its open APIs. In fact, it is hard to imagine because of the hard work of writing data to disk I/O, however, the computing action is to consume CPU. Finally, I got a conclusion in an email reply from a foreigner that "the CPU resource usage cannot be controlled":
I think I answered that question just the other day... privately...
No, there is nothing inLuceneTo help youCPUUtilization.
However, if you are running this on a Unix box of some kind, you can (re) Nice the process and thus lower its priority, giving other processes more time withCPU. Windows may have something similar.
This is the only option for the time being. However, if the Lucene index maintenance process and the website application process are on the same server, maintaining the Lucene index will definitely affect the normal application of the website, i'm afraid that's why many people set the index maintenance time between and in the design.