This article documents how administrators can temporarily disable the search with index function for Journal (Web Content) assets in Liferay DXP 7.0. By default, this function for web content articles is set to true. Note that by disabling this, the platform will search in the database directly which can have a negative impact on full-text search results thus the end-user search experience.
What this does not mean:
- This does not mean the platform has disabled the index altogether. The Search Portlet will still use index queries.
- This does not remove the available Reindex commands from the Control Panel → Configuration → Server Administration tab such as:
- Reindex
com.liferay.journal.model.JournalArticle
. - Reindex
com.liferay.journal.model.JournalFolder
.
- Reindex
Resolution
To temporarily disable the search with index function for Journal (Web Content) assets:
- Navigate to the Control Panel → Configuration → System Settings.
- Click on Web Content Administration (not Web Content Search).
- Uncheck (or check to enable) Journal articles search with index.
Figure 1. Journal articles search with index has been disabled. - Click the Update button.
The platform is now updated such that searching for journal articles will not search with index but the database directly.
Alternatively, the same task can be done in Liferay DXP 7.0 by using .cfg
files and not in the portal-ext.properties
anymore. This method is less desirable for reasons stated above.
-
In the
/osgi/configs
folder, create a file calledcom.liferay.journal.web.configuration.JournalWebConfiguration.cfg
- Open this file with a text editor.
- Enter the following:
journalArticlesSearchWithIndex=false
. - Save the file.
The platform will detect the new configuration and the changes will take effect (administrators might have to refresh the browser to see the changes take effect).
Once the changes have been made, the server will search the database directly and not with the index.