Problem Description:
After users search using a custom result page, the “author” property would return the value of the Author Document Property in Word documents. e.g. for Word 2007, Click Office Button > Prepare > Properties.
The customer wanted to retrieve the Created By value from the list instead.
Our Solution:
Add a new Managed Property that will reference an out of the box Office:4(Text) Crawled Property.
Step 1 – Create a New Managed Property
- In SSP, Search Administration, go to Search Settings > Metadata property mappings.
- Create a new Managed property called “ItemCreatedBy“, Check the radio button – “Include values from a single crawled … specified”
- Click OK
- On the left navigation, select Crawled Properties > Click on Office Category
- Heres the tricky part. As there are two Office:4(Text) properties, we need to select the correct one. Select any Office:4 property, and find the one that has Property Set ID = f29f85e0-4ff9-1068-ab91-08002b27b3d9
- Once you have found the correct one, click Add Mapping and select our newly created manage property ItemCreatedBy
- Run a full Crawl.
Step 2 – Customising Search Core Result
- Go to your custom search page, and go to edit properties for the Search Core Result web part
- Under Results Query Options, in the selected columns add a new Column Entry for ItemCreatedBy, e.g. <Column Name=”ItemCreatedBy”/> and click ok
- Modify the XSL, the trick here is the make sure that when you reference your ItemCreatedBy, it must all be LOWERCASE, or it won’t work. e.g. <xsl:value-of select=”itemcreatedby” />
Advertisement