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

Search Portlet results are inaccurate in showing more results than there are with Solr

    Details

      Description

      Issue Solr overcounts number of entries in the Asset Publisher, and the following errors enter the stacktrace

       16:28:23,426 ERROR [catalina-exec-80][IncludeTag:253] Current URL /user/test/so/my-documents?p_p_id=3&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_3_struts_action=%2Fsearch%2Fsearch&_3_redirect=%2Fuser%2Frshah2%2Fso%2Fmy-documents%3Fp_p_auth%3DHm56FIUW%26p_p_id%3D20%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26_20_struts_action%3D%252Fdocument_library%252Fview_file_entry%26_20_redirect%3Dhttps%253A%252F%252Fcollaborate.iuhealth.org%252Fuser%252Frshah2%252Fso%252Fmy-documents%253Fp_p_auth%253DHm56FIUW%2526p_p_id%253D20%2526p_p_lifecycle%253D0%2526p_p_state%253Dnormal%2526p_p_mode%253Dview%2526_20_entryEnd%253D20%2526_20_displayStyle%253Dlist%2526_20_viewEntries%253D1%2526_20_viewFolders%253D1%2526_20_expandFolder%253D0%2526_20_folderStart%253D0%2526_20_action%253DbrowseFolder%2526_20_struts_action%253D%25252Fdocument_library%25252Fview%2526_20_folderEnd%253D20%2526_20_entryStart%253D0%2526_20_folderId%253D6068775%26_20_fileEntryId%3D5960034&_3_keywords=sync&_3_groupId=0 generates exception: com.liferay.portlet.asset.NoSuchEntryException: No AssetEntry exists with the key {classNameId=10108, classPK=675431}
      16:28:23,428 ERROR [catalina-exec-80][IncludeTag:154] com.liferay.portlet.asset.NoSuchEntryException: No AssetEntry exists with the key {classNameId=10108, classPK=675431}
              at com.liferay.portlet.asset.service.persistence.AssetEntryPersistenceImpl.findByC_C(AssetEntryPersistenceImpl.java:2463)
              at com.liferay.portlet.asset.service.impl.AssetEntryLocalServiceImpl.getEntry(AssetEntryLocalServiceImpl.java:215)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
              at com.liferay.portlet.asset.service.AssetEntryLocalServiceUtil.getEntry(AssetEntryLocalServiceUtil.java:361)
              at org.apache.jsp.html.portlet.search.main_005fsearch_005fresult_005fform_jsp._jspService(main_005fsearch_005fresult_005fform_jsp.java:625)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
              at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:97)
              at com.liferay.portal.servlet.PACLRequestDispatcherWrapper.doDispatch(PACLRequestDispatcherWrapper.java:90)
      

      Please see screenshot for examples of this behavior. In the screenshot, after searching "test" there are over 5000 results, even though there are less than 300 users, and no Web Content articles in the Portal.

      Steps to Reproduce
      1. Install Solr in Liferay. For this issue, use solr-web-6.1.20.2-ee-ga2-20121226141007185
      2. Add some content into the Portal (e.g. Calendar event, Web Content, etc.) and name the content 'test.'
      3. Add search portlet to a page and search 'test'
      4. Reindex the server to verify that the index is up to date.
      Result: First page of results will show only a couple or no results, but the search portlet will note that it is showing first 1-20 results. Note any inaccuracies in the count on the left hand for Document Types, etc. Also, note the above error in the stacktrace.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 49 weeks, 3 days ago

                  Packages

                  Version Package
                  6.1.X EE
                  6.2.0 CE RC6