SharePoint Stuff

A collection of helpful tips and resources on maximising the value from a SharePoint Portal Server and Windows SharePoint Services Implementation.

Thursday, February 23, 2006

SharePoint Portal Server Meta Data Search Myth
The above link is an excellent description on how to set up SharePoint to allow you to search on custom meta data that have been added in your document libraries.

There are however a couple of details to note about this advanced search functionality, that isn't commonly known.

1. While the custom fields exist in the documents and document libraries, if you change the "Search by type" drop down to either "Document Libraries" or "Documents" these additional items disappear and only the default search fields are available. To use the custom fields please ensure that the "Search by Type" is set to "[Any Type]".

2. Secondly, and more importantly, the web page fails to mention how Word and SharePoint deal with custom meta data. In the web page all examples use meta data that is entered manually, as in they are free text boxes, not selected from a SharePoint List. When using values from a SharePoint list the id of the value is stored rather than the actual value. To better illustrate what I mean please
• In any area create a custom list called “CountryList” with 1 field called “Value”. Populate it with your choice of country names.
• Create a document library in the same area and add a new field called “Country” and set it to be a lookup field on “CountryList”, column “value”.
• Add a few documents in this library and then follow the steps detailed in the url link provided above to ensure that the document is indexed and advanced search allows you to search specifically on “Country”.
• Go back to the document library and view the properties of the document.
• The properties page shows the various meta data for the particular file, eg Country="United States of America"
• Now click on the file name to open
• Within Word select File -> Properties
• Within the popup select the "File Properties" button at the bottom
• Click on the Custom tab and you should see all the custom properties in Word
• The thing to note is that Word stores the values for lookup fields - not as the string value but as the id, in the example above – Country has the value “209” denoting the “United States of America”. This is because the US is the 209th item in the CountryList Custom List.

Hence when you use the advanced search and select "Country" and then "contains", and then entering "America" will not return any results. You need to instead use the value "209" to return all documents where the Country is the United States of America.

This is a limitation of the Advanced Search feature, which is not usually documented. The advanced search of meta data will work for all text entered fields but not the same way for list lookup fields.


At 12:13 PM, Anonymous Anonymous said...

Nice one Ronnie! :)
Working on ways to solve this one!
Gotta love office!

At 5:06 PM, Blogger Ronnie Guha said...

Found a fix - refer blog entry


Post a Comment

<< Home