Details

      Description

      Master/7.1 are not affected, because LPS-86537 eliminated the use of the scroll API.

      When calling reindex by specific entity types, we rely on the search scroll API when returning and processing the search hits. Once the initial search request returned the first batch of hits, we should keep scrolling the rest of the search hits.

      Steps to reproduce

      Reproduced also with Connector to Elasticsearch 6 1.0.1

      1. Startup Liferay 7.0.x
      2. Have more indexed document with entryClassName "com.liferay.journal.model.JournalArticle" than in the DB. Use the attached script to add 50 documents to the search index.
      3. Go to Control Panel -> Configuration -> Server Administration and run "Reindex com.liferay.journal.model.JournalArticle."
      4. Using the below query, verify that the documents created by the script were deleted properly.
        POST /_search
        {
          "query": {
            "bool": {
              "filter": {
                "term": {
                  "entryClassName": "com.liferay.journal.model.JournalArticle"
                }
              }
            }
          }
        }
        

      Expected results: Index will get into sync with DB regarding JournalArticles
      Actual reindex results: Only 10 documents will be deleted from the index.

      Note: Why 10? See https://github.com/elastic/elasticsearch/blob/v6.5.4/server/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java#L201.

        Attachments

          Activity

            People

            • Assignee:
              sharry.shi Sharry Shi
              Reporter:
              istvan.sajtos Istvan Sajtos
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                10 weeks, 6 days ago