In this post I'll describe how to customize the document signature in FAST Search for SP2010.
The documentsignature is the MP (integer) that we use to de-duplicate results (also known as collapsing). It is a SHA-256 generated integer.
Get-FASTSearchMetadataManagedProperty -Name documentsignature
Name : documentsignature
Description : ID used for duplicate collapsing
Type : Integer
Queryable : True
StemmingEnabled : False
RefinementEnabled : False
MergeCrawledProperties : False
SubstringEnabled : False
DeleteDisallowed : True
MappingDisallowed : False
MaxIndexSize : 1024
MaxResultSize : 64
DecimalPlaces : 3
SortableType : SortableEnabled
SummaryType : Static
The Document signature value is calculated out of the stage called "DocumentSignature"
The stage comes AFTER the mapping of crawled properties- managed properties which means the input fields reference MP not CP
<!-- Process managed properties -->
<processor name="LanguageDetectorSecondPass" />
The Stage definition is as follows
<processor name="DocumentSignature" type="general" hidden="0">
<load module="processors.DuplicateId" class="DuplicateId"/>
<param name="Output" value="documentsignature" type="string"/>
<param name="Input" value="title:0:required body:1024:required documentsignaturecontribution" type="string"/>
As you may noticed there are 3 input MPs here : title, body and documentsignaturecontribution.
How to read the Input parameter ?
length is to limit the number of bytes to take into account for signature computation. 0 means no limit (entire content).
required : the field is mandatory for signature computation. If the field is not mapped (no value) no document signature is generated.
if no length or required parameter is set (i.e documentsignaturecontribution) the MP is taken into account if populated with no limit of the number of bytes.
Well as seen above there is in FAST Search Server a mechanism to influence the document signature besides title and body MPs !
documentsignaturecontribution is a placeholder MP.
Example of Use
1. Create a custom list in SP2010 with 4 columns DSTitle, DSContribution, DSBody and DSID (optional).
2. Run a Crawl so that we have the newly discovered crawled properties available for mapping.
3. Map DSTitle and DSBody to their corresponding MP (title is already mapped since I just renamed the column name from Title to DSTitle).
4. Now you create the documentsignaturecontribution Managed Property as Text (string) and map it to your custom column DSContribution.
5. Now run a full crawl
6. Based on my list (see point #1) I expect list item #1, #2 and #5 to be different and list item #3 and #4 to be de-duplicated.
I can verify this in the FAST Search Center:
7. You can also verify it on the qrserver xml output as well
The query we get from the FAST Search Center
The collapsing on the QRServer
The FCOCOUNT indicates how many documents where collapsed into one search result, the SITEID indicate the field value we collapsed on here the document signature field.
The SITEID from the qrserver is transmitted as the fcoid property on the front-end.
Et Voila !
I hope you'd find this feature useful as it allows you to refine the document signature out of the box (title and body:1024) and leverage it to fit your customers requirements.
Keep in mind that documentsignaturecontribution is not size limited (bytes). You don't want to map a huge amount of data and impact document processing performance much.
Enjoy. Stay tuned.