hhuijser/liferay-portal — pull request #1955 by yuhai (2014-06-20 09:17:07+00:00)
Title: LPS-45619 Search portlet finds Staging Web Content that the User doesn't have access to

Ray has confirmed the issue is one bug. Please refer to the below link:
https://in.liferay.com/web/global.engineering/forums/-/message_boards/message/2534993#_19_message_2535061

Please also refer to the below fix logic:

Staging site should not be one real public site or private site. And staging site only used for the workflow. So when search by using "everything" in live site, we should filter the staging site's data. Otherwise, we will get duplicated data when staging site is synchronized with live site.

For using "Field.STAGING_GROUP", when we add site's entries (for example, web content, blog) to index, we add the field for site's entries. When we add the portal's data (for example, user), we don't add the field for user. Please refer to BaseIndexer.addStagingGroupKeyword() method.

So using "STAGING_GROUP MUST_NOT true" condition, we can filter staging site's data.

If we use Search Portlet in staging site, I think we also should remove "everything" option.

Thanks,
Hai