FAST SharePoint Property Mapping Report FAST SharePoint Property Mapping Report
FAST-SharePoint
Share:

Generating a FAST SharePoint Property Mapping Report

In Search, it is not an exageration to say the property mapping is the heart of the customized search intelligence. Managed properties allow search to be customized, to serve an organization’s needs. I thought it would be useful to report on the mapping of the managed properties to crawled properties. I use a CSV format for the report, where a ‘|’ is used as the delimiter, and a semi-colon is used to separate crawled properties. Using Excel, one can easily convert pipe-delimited into columns.

The first thing we want to do is get the collection of managed properties using Get-FASTSearchMetadataManagedProperty. Then for each Managed Property, we get the associated crawled properties using the getcrawledPropertyMappings() method. Here’s the full script:

$ReportFileName = "C:tempMappingReport.csv"
$sep = '|'
cls
 
$LineOut = "Name$($sep)Description$($sep)Type$($sep)Mapping"
add-content $ReportFileName $($LineOut)
 
$mps = Get-FASTSearchMetadataManagedProperty
 
Foreach ($MP in $mps)
{
    $q = $MP.getcrawledPropertyMappings();
    $CPs=$null
    if ($q.gettype().Name -eq "CrawledPropertyMappingImpl") 
    {
        foreach ($cp in $q)
        {
            $CPs = "$($cps);$($cp.name)"
        }
        if ($CPs -ne $null)
        {
            $cps = $CPs.remove(0,1);
        }
    }
    else
    {
        $CPs = $q.gettype().Name;
    }
 
$LineOUt = "$($MP.Name)$($sep)$($MP.Description)$($sep)$($MP.Type)$($sep)$($CPS)"
add-content $ReportFileName $($LineOut)
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Want to talk?

Drop us a line. We are here to answer your questions 24*7.