SharePoint is a web portal which acts as a collaborative platform to manage, search, and share contents. SharePoint search is an excellent and highly powerful search. Search schemas can be configured and managed in SharePoint to make it more efficient based on our needs. We can create search properties through this search schema and map it to a list column or an existing user profile property.
Those contents will be crawled and will be available for the user search. SharePoint on-premise has the option to crawl the properties and contents manually or automatically. But in SharePoint online, it has to be performed automatically. So, we need to wait for an hour or two to make content available for search, after adding it. In case we need to perform a search crawl manually, we can always contact Office 365 support team.
Create a Search Property:
2. Click Search from the left menu.



Migrating Search Crawl Property:
SearchConfigurationPortability searchConfiguration = null;
SearchObjectOwner searchObjectOwner = null;
ClientResult < string > configResults = null;
string stringresult = string.Empty;
try {
searchConfiguration = new SearchConfigurationPortability(clientContext);
searchObjectOwner = new SearchObjectOwner(clientContext, SearchObjectLevel.SPSiteSubscription);
configResults = searchConfiguration.ExportSearchConfiguration(searchObjectOwner);
clientContext.ExecuteQuery();
if (configResults.Value != null) stringresult = configResults.Value;
} catch (Exception) {
throw;
}
return stringresult;
}
After storing it, use the below code to migrate the configurations to a new tenant.
private static void importSearchSettings(ClientContext clientContext) {
SearchObjectOwner searchObjectOwner = null;
string location = string.Empty, directory = string.Empty;
try {
location = Assembly.GetExecutingAssembly().Location;
directory = Path.GetDirectoryName(location);
searchConfigurationString = System.IO.File.ReadAllText(directory + “/searchConfiguration.xml”);
searchConfiguration = new SearchConfigurationPortability(clientContext);
searchObjectOwner = new SearchObjectOwner(clientContext, SearchObjectLevel.SPSiteSubscription);
searchConfiguration.ImportSearchConfiguration(searchObjectOwner, searchConfigurationString);
clientContext.ExecuteQuery();
} catch (Exception) {
throw;
}
}