I’ve run some extensive tests this morning on a test install of SharePoint 2007, to find out how the default Document Properties in Office documents are used in the default SharePoint 2007 SearchCenter search results. I had been unable to find useful documentation about what is and isn’t indexed and reported, so these are my findings.
Firstly, it turns out that the default search in SP2007 uses the “Comments” field (from Document Properties) as its description.
Additionally, it seems that SP2007 does not search the keywords assigned to an Office document via Document Properties. Whilst it is generally a good idea to add keywords to a document, it does not actually seem to affect how the document is found in the SP2007 search.
For Word, Excel and PowerPoint documents, if you search for a word that appears in the document’s description (aka the “Comments” field), then the description is displayed in the search results with the search term highlighted in bold.
For Word, Excel and PowerPoint documents, if you search for a word that only appears in the body of the document, then:
- for Office 2003 documents, a snippet from the body of the document is displayed in the search results, with the search term highlighted in bold. The description is not displayed, even when it exists.
- for Office 2007 documents, the description is displayed in the search results.
I’m not sure why this is different for Office 2003 and Office 2007.
If you search for a term that only appears in the document’s “Keywords” field, then nothing is found in the search.
If an Office document has a title assigned in its Document Properties, then the title is used in the search results. If no title is specified, then the document’s filename (including the file extension) is used instead.
If you want to customise the search results style – for example, to change the behaviour for Office 2003 documents to always display the description if one exists – then you can always customise the search results with your own XSLT. I also found this tip useful to view the search results in their raw XML form.