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

Search queries don't include groupRoleId which misses non-guest-viewable content

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: No Longer Reproducible
    • Affects Version/s: 6.0.6 GA, 6.0.11 EE
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Tomcat/MySQL/Linux

      Description

      When using the search portlet, organization-private content is often not found for non-admin users. In my estimation, this is due to a malformed search query which doesn't honor the user's membership in the current organization. This behaviour is illustrated below for the default Lucene case (I will stick to one portlet, Blogs, for clarity):

      This document (as obtained by dumping it with Luke) is readily indexed:
      -------------
      stored,indexed<companyId:10131>
      stored,indexed,tokenized<content:Lite text om en portlet>
      stored,indexed<entryClassName:com.liferay.portlet.blogs.model.BlogsEntry>
      stored,indexed<entryClassPK:18324>
      stored,indexed<groupId:11369>
      stored,indexed<groupRoleId:11369-10146>
      stored,indexed<modified:20110613141000>
      stored,indexed<portletId:33>
      stored,indexed<roleId:10139>
      stored,indexed<scopeGroupId:15703>
      stored,indexed,tokenized<title:YEAH>
      stored,indexed<uid:33_PORTLET_18324>
      stored,indexed<userId:10904>
      stored,indexed,tokenized<userName:Bruno Admin>
      -------------

      A typical search for "portlet" within "This organization" might look like so:
      15:14:21,793 DEBUG [LuceneIndexSearcherImpl:51] Query ((+(groupId:11369) +portletId:33) +(assetTagNames:portlet comments:portlet content:portlet description:portlet properties:portlet title:portlet url:portlet userName:portlet)) +(userId:10976 roleId:10140 roleId:10141 roleId:10138)

      and obviously, this query will fail to find the above document. I might be completely lost here, in which case I will happily take any pointers. However, I definitely feel that "role clause" of the query is missing the important term "groupRoleId:<groupId>-<roleId of Organization member, 10146 in our case>"

      (Note that the document IS found when searching as admin, in which case there is no explicit "Role clause"...)

      Until I'm further enlightened, I'm considering this a Major bug.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 5 days ago