Legacy Knowledge Base
Published Jul. 2, 2025

Optimizing Lucene

Written By

Liferay Support

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

In most cases, optimizing Lucene is helpful; in larger deployments it is a necessity. This article aims to explain the relevant settings for optimizing Lucene and provide links to further information. It must be mentioned, though, that this service is not supported by Liferay Subscription Services since each Liferay deployment will be different.

Resolution

A good starting point if you have a good amount of available memory on the system is to increase thelucene.buffer.size= setting in the portal-ext.properties. Also, try increasing the lucene.commit.batch.size= setting.

Use trial and error with these lucene settings until you reach your desired benchmark.

Some alternatives to using Lucene or optimizing Lucene yourself:

  1. Use Solr, which is an application that implements and optimizes Lucene, and sits on a dedicated server.

  2. Talk to the Account Manager about possible Liferay services to help optimize Lucene for your environment.

What if I get an "Out of Memory Error" when reindexing?
Try lowering the default values oflucene.buffer.size=16 and lucene.merge.factor=10

Additional Information

Read the benchmark and stress tests here: http://issues.liferay.com/browse/LPS-5837

Did this article resolve your issue ?

Legacy Knowledge Base