Issue
- We changed the
index.search.limit
property inportal-ext.properties
- We also set the same value in Control Panel -> System settings -> Search -> Elasticsearch 7 -> Max Result Window
- The search result limit reverts to 10000 after container restarts.
Environment
- Quarterly Releases
- Containerized environment (e.g., Docker)
- Remote Elasticsearch
Resolution
The issue occurs because the Elasticsearch configuration within the container is not persisting across restarts. To resolve this, you need to configure and bind mount the Elasticsearch OSGi configuration directory.
- Create or edit the Elasticsearch configuration file in the
osgi/configs
directory. - Set the following property in the config file:
indexMaxResultWindow=
- Bind mount the
osgi/configs
directory. For example, if using Docker:
(For more information on bind mounts, please refer to the official Docker documentation: Bind mounts | Docker Docs.)--mount type=bind,src="$(pwd)/dxp/osgi/configs",target=/opt/liferay/osgi/configs
- Set the
index.search.limit
property in yourportal-ext.properties
file to match theindexMaxResultWindow
value. - Configure the Max Result Window in the System Settings (Control Panel > System settings > Search > Elasticsearch 7 > Max Result Window) to the desired value. Ensure this value matches the values set in the previous steps.
- Perform a reindex after applying these changes.