Legacy Knowledge Base
Published Jul. 2, 2025

Liferay DXP Searching & Indexing FAQ

Written By

Brett Ripley

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

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

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

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

This article aims to answer basic questions around how indexing works in Liferay DXP. This information is applicable for all search platforms whether using Elasticsearch, Solr, or some other search. For a full developer’s treatment of developing for the index, please see: Introduction to Search.

Affected Products

  • Liferay DXP 7.0 - Liferay DXP Quarterly Releases (7.4)

Contents

  1. What is indexing and how does it help my platform?
  2. What sort of entities are indexed in Liferay DXP?
  3. When is the index created?
  4. When is the index updated?
  5. Can I "force" a reindex in Liferay?
  6. How do I write code in a way that allows my entities to be indexed?

Resolution

What is indexing and how does it help my platform?

Liferay stores its information in a database, so why not search the database directly? Why add the complexity of a search engine? First, because database table merges are expensive! Documents in a search index often contain searchable fields from multiple tables in the database. Traversing the date in this way takes too long.

In addition to the performance problem, search engines provide access to additional features, like relevance and scoring. By contrast, databases do not support features like fuzzy searching or relevancy. Moreover, search engines can apply algorithms such as “More Like This” to return similar content. Search engines also support geolocation, faceting of search results, and multilingual searching.

What sort of entities are indexed in Liferay DXP?

Here are the DXP entities that utilize search index out of the box:

  • Bookmark entries
  • Bookmark folders
  • Blog entries
  • Calendar & Calendar Events
  • Categories
  • Change List entries
  • Custom Fields (Expando)
  • Documents and Media files
  • Documents and Media folders
  • Dynamic Data List records
  • Dynamic Data Mapping fields (for example for Web Content Structures, Forms)
  • Message Board Messages and Threads
  • Organizations
  • Polls
  • Segments entries
  • System Settings
  • Tags
  • Users
  • User Groups
  • Web Content articles
  • Web Content folders
  • Wiki pages
  • Workflow metrics

To index custom entities, read:

When is the index created?

The initial search index is initialized for each virtual instance the first time you start DXP with Elasticsearch or Solr. To fully index all entries you need to perform a “Reindex” from the Control Panel (see below).

When is the index updated?

By default, the search index is updated every time an indexable entity is:

  • Created
  • Modified
  • Deleted

Can I “force” a reindex in Liferay?

There’s a number of reasons you may need to create a new index from scratch. Whether it’s following an upgrade or it’s just that the search isn’t pulling up the correct results, we’ve made it simple to delete the existing index and create a new one.

To reindex:

  1. Log in as an administrative user
  2. Click on Control Panel → Configuration → Search (in DXP 7.3 and Liferay DXP Quarterly Releases (7.4), it is under Control Panel → Search, and the Index Actions tab)
  3. Click the Execute button for Reindex all search indexes and then Reindex all spell check indexes.

Please note that, depending on how many entities there are, the reindexing may be a time and memory-intensive operation. Please plan the timing of your reindex accordingly.

How do I write code in a way that allows my entities to be indexed?

We have documented exactly how a developer would do that in this article: Indexing Framework

Did this article resolve your issue ?

Legacy Knowledge Base