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

Extra calls to Search API in Kaleo Workflow are being made unnecessarily in workflow admin pages

    Details

      Description

      Steps to Reproduce:

      1. Go to Control Panel > Configuration > Server Administration > Log Levels
      2. Enable log with DEBUG level for these entries(considering the elasticsearch 6 integration):
        1. com.liferay.portal.search.elasticsearch6.internal.search.engine.adapter.search.SearchSearchRequestExecutorImpl
        2. com.liferay.portal.search.elasticsearch6.internal.search.engine.adapter.search.CountSearchRequestExecutorImpl
      3. Go to My Submissions page
      4. Verify server log

      Expected Result:

      just one call for query the search entries and other for count must be executed

      Actual Result:

      Extra calls are being made unnecessarily

      {"from":0,"size":5,"query":{"bool":{"must":[{"match_all":{"boost":1.0}}],"filter":[{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"term":{"entryClassName":{"value":"com.liferay.portal.workflow.kaleo.model.KaleoInstanceToken"}}}]}}]}}]}}]}},"explain":false,"stored_fields":["uid","companyId","entryClassPK","entryClassName","assetDescription_en_US","assetTitle","kaleoInstanceId","assetTitle_en_US","assetDescription"],"sort":[{"completed_String_sortable":{"order":"asc","unmapped_type":"keyword"}},{"createDate_Number_sortable":{"order":"asc","unmapped_type":"keyword"}},{"kaleoInstanceId_Number_sortable":{"order":"asc","unmapped_type":"keyword"}}],"track_scores":true}
      
      {"size":0,"query":{"bool":{"must":[{"match_all":{"boost":1.0}}],"filter":[{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"term":{"entryClassName":{"value":"com.liferay.portal.workflow.kaleo.model.KaleoInstanceToken"}}}]}}]}}]}}]}},"explain":false}
      
      {"size":0,"query":{"bool":{"must":[{"match_all":{"boost":1.0}}],"filter":[{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"term":{"entryClassName":{"value":"com.liferay.portal.workflow.kaleo.model.KaleoInstanceToken"}}}]}}]}}]}}]}},"explain":false}
      
      {"from":0,"size":5,"query":{"bool":{"must":[{"match_all":{"boost":1.0}}],"filter":[{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"term":{"entryClassName":{"value":"com.liferay.portal.workflow.kaleo.model.KaleoInstanceToken"}}}]}}]}}]}}]}},"explain":false,"stored_fields":["uid","companyId","entryClassPK","entryClassName","assetDescription_en_US","assetTitle","kaleoInstanceId","assetTitle_en_US","assetDescription"],"sort":[{"completed_String_sortable":{"order":"asc","unmapped_type":"keyword"}},{"createDate_Number_sortable":{"order":"asc","unmapped_type":"keyword"}},{"kaleoInstanceId_Number_sortable":{"order":"asc","unmapped_type":"keyword"}}],"track_scores":true}
      
      {"size":0,"query":{"bool":{"must":[{"match_all":{"boost":1.0}}],"filter":[{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"term":{"entryClassName":{"value":"com.liferay.portal.workflow.kaleo.model.KaleoInstanceToken"}}}]}}]}}]}}]}},"explain":false}
      
      {"size":0,"query":{"bool":{"must":[{"match_all":{"boost":1.0}}],"filter":[{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"term":{"entryClassName":{"value":"com.liferay.portal.workflow.kaleo.model.KaleoInstanceToken"}}}]}}]}}]}}]}},"explain":false}
      
      {"from":0,"size":5,"query":{"bool":{"must":[{"match_all":{"boost":1.0}}],"filter":[{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"term":{"entryClassName":{"value":"com.liferay.portal.workflow.kaleo.model.KaleoInstanceToken"}}}]}}]}}]}}]}},"explain":false,"stored_fields":["uid","companyId","entryClassPK","entryClassName","assetDescription_en_US","assetTitle","kaleoInstanceId","assetTitle_en_US","assetDescription"],"sort":[{"completed_String_sortable":{"order":"asc","unmapped_type":"keyword"}},{"createDate_Number_sortable":{"order":"asc","unmapped_type":"keyword"}},{"kaleoInstanceId_Number_sortable":{"order":"asc","unmapped_type":"keyword"}}],"track_scores":true}
      
      {"size":0,"query":{"bool":{"must":[{"match_all":{"boost":1.0}}],"filter":[{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"term":{"entryClassName":{"value":"com.liferay.portal.workflow.kaleo.model.KaleoInstanceToken"}}}]}}]}}]}}]}},"explain":false}
      
      {"size":0,"query":{"bool":{"must":[{"match_all":{"boost":1.0}}],"filter":[{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"term":{"entryClassName":{"value":"com.liferay.portal.workflow.kaleo.model.KaleoInstanceToken"}}}]}}]}}]}}]}},"explain":false}
      
      

       

      NOTE: We will try to fix it using only one call for the search api

        Attachments

          Activity

            People

            Assignee:
            rodrigo.cunha Rodrigo Cunha
            Reporter:
            rafael.praxedes Rafael Praxedes
            Participants of an Issue:
            Recent user:
            Yunlin "Steven" Sun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              34 weeks, 1 day ago

                Packages

                Version Package
                7.1.10 DXP FP19
                7.1.10.5 SP5
                7.1.X
                7.2.10 DXP FP6
                7.2.X
                7.3.3 CE GA4
                7.3.10 DXP GA1
                Master