legacy-knowledge-base
公開されました Jun. 30, 2025

View Count on Display Page not updated in index

written-by

Daniel Martinez Cisneros

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

learn-legacy-article-disclaimer-text

Issue

The values viewCount or viewCount_sortable are not being updated when users visit content displayed on a Display Page. However, the values are correctly updated in the ViewCountEntry table.

Environment

  • Quarterly Releases

Resolution

In a recent analysis of platform performance, a specific behavior was introduced through LPSA-40295. However, it was later identified that updating the index automatically caused significant performance degradation under high demand.

Updating this specific value in the indexes led to slower platform response times when processing a high volume of requests. To mitigate this performance issue, the decision was made to avoid automatic index updates for this value. Instead, the change ensures that the value is only updated in the database automatically or when the associated asset is explicitly modified in the indexes. You can find more details about this improvement in LPSA-49468.

To handle this behavior effectively, you have the following options:

  1. Use the Value Stored in the Database
    Rely on the value stored in the database for any necessary operations. This avoids relying on the indexed value and ensures consistency with the latest updates.

  2. Manage Reindexing Periodically
    If the indexed value is crucial for your processes, you can create a custom Scheduler to handle periodic reindexing. The Scheduler would:

    • Read the updated value from the database.
    • Reindex the value as needed, ensuring it reflects the latest state.
did-this-article-resolve-your-issue

legacy-knowledge-base