concept optimization in category hibernate

This is an excerpt from Manning's book Hibernate Search in Action.
Remember, the greater the number of segment files (.cfs), the slower searches become, so be sure to optimize. How often you optimize depends on several factors, but this tab will help you determine how often you will need to do it. For more information about optimization, check out section 9.3.
First and foremost, is the application too slow for your use case? In many cases, Lucene and Hibernate Search are doing a good job out of the box. If some searches are considered too slow or if indexing is taking too long, be sure to identify the problem clearly and define your goal in terms of performance. Finally, try to understand the cost of optimization. Optimization can be costly in many different ways: the time you, as a developer or architect, spend on the problem; the effect on code readability; the use of additional resources (you might optimize response time by using more memory or CPU); and so on.
When this method is called, the optimization operation is immediately executed. Contrary to index operations, optimize does not wait until the end of the transaction. You can still query while an optimization is in progress, but queries tend to be much slower for the duration of the optimization process.