Disabling Search With Index for Web Content

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.


To temporarily disable the search with index function for Journal (Web Content) assets:

  1. Navigate to the Control Panel → Configuration → System Settings.
  2. Click on Web Content Administration (not Web Content Search).
  3. Uncheck (or check to enable) Journal articles search with index.
    Figure 1. Journal articles search with index has been disabled.
  4. 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.

  1. In the /osgi/configs folder, create a file called com.liferay.journal.web.configuration.JournalWebConfiguration.cfg

  2. Open this file with a text editor.
  3. Enter the following:journalArticlesSearchWithIndex=false.
  4. 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.

Was this article helpful?
1 out of 1 found this helpful