none
Discussions from Community sites where the user is member?

    Question

  • In community portal, I want to list all the discussions from all the communities where the user is member of. I have 100+ community sites collections and one community portal. All the content are crawled and indexed. I want to use search results web part to achieve this. Not sure what kind of configurations I should do? I am able to target only discussions using KQL. But not sure how can I restrict to show from community sites where the user of member of.
    Sunday, April 14, 2019 12:06 PM

Answers

  • I found the solution. I used the following KQL in search results web part and it returned the community sites where the user is an active member.

    MemberStatusIntOWSINTG = 1 MemberOWSUSER:{User.Name} 

    • Marked as answer by MC ROY Thursday, April 18, 2019 10:08 AM
    Thursday, April 18, 2019 10:08 AM

All replies

  • Hi

    Just use the user to do the KQL search and he can only get data he has permission to view.


    Justin Liu Office Apps & Services MVP, MCSE
    Senior Software Engineer
    Please Vote and Mark as Answer if it helps you.

    Monday, April 15, 2019 1:04 AM
  • Hi, 

    Your request cannot be achieved by using the search result web part.

    Search Result web part uses query-able managed properties mapped to crawled properties to return specific results. However, there is no crawled property that stands for “members in a community site”, so the web part will not be able to judge if a user is a member of the community site or not.  

    Best regards, 

    Allen Bai


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Monday, April 15, 2019 9:04 AM
  • It seems it is possible to find out the user who is member of a community site as per https://social.technet.microsoft.com/Forums/en-US/2f84207d-82ab-43dd-afca-bfa6328d485c/how-to-find-the-list-of-community-sites-where-a-user-is-member-of but it has an issues as discussed. 

    1. MemberOWSUSER:{User.Name} filters the community sites but does not respect the status of the member. 

    I am trying to include the member status as part of the KQL. Any idea ??

    Tuesday, April 16, 2019 8:02 AM
  • Hi,

    No, there is no such a related property that would show the status of the member. 

    Per my test, MemberOWSUSER:{User.Name} will display the members in the community sites. However, when user leave the site, he will still display in the search results.

    Best regards,

    Allen Bai


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, April 18, 2019 7:13 AM
  • I found the solution. I used the following KQL in search results web part and it returned the community sites where the user is an active member.

    MemberStatusIntOWSINTG = 1 MemberOWSUSER:{User.Name} 

    • Marked as answer by MC ROY Thursday, April 18, 2019 10:08 AM
    Thursday, April 18, 2019 10:08 AM