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

Search result count is limited to 10000 when you use Elasticsearch 7

    Details

      Description

      Solution notes

      The fix introduced a new property to the ElasticsearchConfiguration called "trackTotalHits" defaults to "true":

      Set this to true to accurately count the total number of hits when there are more than 10,000 results for a search. Setting this to true may have an impact on performance when there is a large number of hits for a search.


      Affects

      • Liferay Connector to Elasticsearch 7 v3.0.1 and prior for DXP 7.2, fixed in: To be released. Subscribers can request the fix as a Hotfix LPKG through Liferay Support.

      Search result count is limited to 10000 when you use Elasticsearch 7 due to a breaking change of that version:

      By default, search request will count the total hits accurately up to 10,000 documents. If the total number of hits that match the query is greater than this value, the response will indicate that the returned value is a lower bound.

      This Elasticsearch change causes problems in some Liferay functionalities, for example, if you have more than 10000 users, the total number of users will be displayed wrongly in:

      • Members that match a condition in users segment
      • User list count in users and organization

      Steps to reproduce 1 - user segment

      1. Create 15000 users using attached add15000Users.groovy script.
        • Execute the groovy script from Control Panel => Server Administration => Script
      2. Go to a site => people => segments
      3. Create a segment that includes all created users, for example configure a rule: "Last Name" Equals "User" (all users created by the groovy script of the step-1 will have 'User' as last name)
      4. Check how many users match the condition:
        • Expected behavior: Conditions Match 15000 Members is displayed
        • Wrong behavior: Conditions Match 10000 Members is displayed

      Steps to reproduce 2 - users and organizations

      1. Create 15000 users using attachedĀ add15000Users.groovy script.
        • Execute the groovy script from Control Panel => Server Administration => Script
      2. Go to Control Panel => Users => Users and Organizations
      3. Users list will be displayed
      4. Check user number in the bottom of the page:
        • Expected behavior: 15000 user count is displayed
        • Wrong behavior: 10000 user count is displayed

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              brian.lee Brian Lee
              Reporter:
              jorge.diaz Jorge Diaz
              Participants of an Issue:
              Recent user:
              Jorge Diaz
              Engineering Assignee:
              Bryan Engler
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 8 weeks, 5 days ago

                  Packages

                  Version Package
                  7.2.X
                  7.3.5 CE GA6
                  7.3.10 DXP GA1
                  Master