Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-51880

After modifying a Structure, a wrong webcontent version is indexed in Lucene index when journal.articles.index.all.versions=false

    Details

      Description

      Steps to Reproduce

      1. Install both LPS-48407 and LPS-50579
      2. Activate journal.articles.index.all.versions=false flag at portal-ext.properties
      3. Create a new web structure and template
      4. Create a new webcontent using previous created structure
      5. Add 2 additional article versions to webcontent (so now we have 1.0, 1.1 and 1.2)
      6. Enable ALL log levels for this category from Control Panel:
        com.liferay.portal.search.lucene.LuceneIndexWriter
        
      7. Modify created web structure

      Expected behaviour:

      You should see only one line like this in logs (only 1 document is reindexed):

      [liferay/search_writer/SYSTEM_ENGINE-2][LuceneIndexWriter:124] Updated document xxxxxxxx
      

      Actual behaviour: you see three lines, so document is reindexed once per version (which is wrong)

      [liferay/search_writer/SYSTEM_ENGINE-2][LuceneIndexWriter:124] Updated document xxxxxxxx
      [liferay/search_writer/SYSTEM_ENGINE-2][LuceneIndexWriter:124] Updated document xxxxxxxx
      [liferay/search_writer/SYSTEM_ENGINE-2][LuceneIndexWriter:124] Updated document xxxxxxxx
      

      This problem is caused by LPS-50579. Its code does not consider that "LPS-48407 + journal.articles.index.all.versions=false" can be configured at system.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 49 weeks, 2 days ago

                  Packages

                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M4