Forum Discussion

kennyg's avatar
kennyg
Copper Contributor
May 30, 2024

Remove SP list columns from search results

I have created an employee directory in a SharePoint list.  Currently, when I search the list using my name all records are returned since I created the records.  I would like to remove the "Created by" and "Modified by" columns from the search results so that when someone searches for me all records are not returned.  I'm looking for a solution that can be applied at the site level as I do not want to change the default behavior for other sites in the tenant.

  • Josh_Wickes's avatar
    Josh_Wickes
    Brass Contributor
    By default, the “Created by” and “Modified by” columns are mapped to crawled properties named ows_Created_0x0020_By and ows_Modified_0x0020_By.
    You can remove this mapping to prevent these columns from appearing in search results.
    Go to the SharePoint Administration Center.
    Navigate to “Manage search scheme” and then “Managed properties.”
    Find the managed properties corresponding to “Created by” and “Modified by.”
    Ensure that the “Allow search” option is unchecked for these properties1.
    Uncheck “Include in Full-Text Index”:
    Another approach is to open the ows_Created_x0020_By and ows_Modified_0x0020_By crawled properties.
    Uncheck the box labeled “Include in full-text index” for both properties.
    This action will prevent these properties from being included in the search index, effectively excluding them from search results
    • kennyg's avatar
      kennyg
      Copper Contributor

      Josh_Wickes, I did not want to impact search results for other sites I just wanted to make the changes for the site with the staff directory.  So, at this point I'm reluctant to make any changes at the tenant level.  I've removed the mappings for ows_Created_x0020_By and ows_Modified_x0020_By at the site level, but so far it hasn't made a difference.  All of the settings for the managed properties are grayed out so I'm unable to make any changes to the settings.  According to this MS page, the only settings that you can change for built-in managed properties are their mappings to crawled properties and the alias.

       

      I'm unsure of how long it takes for a site or list to be recrawled.  My understanding is that if you request that a site be reindexed that that just adds it to the que.  I'll take a look after the weekend and see if the search results have changed.

    • kennyg's avatar
      kennyg
      Copper Contributor

      DaveMehr365, I want users to be able to use the search bar at the top of the page in SharePoint Online.  It is my understanding (from reading this page) that while you can use a custom search results page for site search, you cannot customize the search results page when you are searching within a list.  

Resources