Forum Discussion
Remove SP list columns from search results
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
- kennygMay 31, 2024Copper 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 https://learn.microsoft.com/en-us/sharepoint/manage-search-schema#:~:text=For%20the%20built%2Din%20managed%20properties%2C%20you%20can%20change%20their%20mappings%20to%20crawled%20properties%2C%20but%20the%20only%20setting%20you%20can%20change%20is%20the%20alias. 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.
- Josh_WickesJun 04, 2024Brass ContributorDid the above work?
- kennygJun 07, 2024Copper Contributor
Josh_Wickes No, removing the mappings at the site level did not work. Search still returns results based on the Created by and Modified by fields.
Instead of removing the columns from the search we have decided to take a different approach. Most additions and updates to this list will be done by a flow. The flows connection to SharePoint will use a service account with a name that is not likely to be searched and thus won't show up in search results.
For additions or edits that are made to the list directly from SharePoint. We are considering a flow that will change the modified by and created by fields to the service account. Here are two different posts explaining how to create such a flow:
https://elliskarim.com/2022/09/13/how-to-easily-change-the-creator-or-editor-of-a-sharepoint-file-or-item-using-power-automate/
https://johnliu.net/blog/2019/2/flowninja-hack-78-modifying-modified-by-and-modified-time-with-microsoft-flow