Searching custom properties in Microsoft Office document with Index server

I have been fighting this for a while, and after speaking to Microsoft I think have the correct procedure, I have to say I found the documentation on Index server querying and management a little confused.

  • Create a Word document or Excel sheet and on the file menu select properties. Pick the custom tab and add a custom property e.g. custID and set it 12345. Save the document
  • On the machine ruinning index server select Admin Tools|Computer Management find the index server option, create a new catalog pointing the directory the files are in (just as documented nothing clever required here)
  • Let it index the files
  • In the management tool go into the new catalog and look at document the properties, you should see lots of things that could be indexed including the custom properties you created.
  • Select each custom property in turn (right click on them and select properties) and set that the property is cached and at the primary storage level
  • We need to give the custom properties friendly name. To do this create a text file somewhere call something like  search.idq and put entries as follows in it, one row for each custom property you have, the GUID can be seen in the properties window, I think it will be the same for all Office documents. The name in quotes is the friendly name we want to see, I have always matched this to the property name but I don't know if this is required

[Names]
CustID = d5cdd505-2e9c-101b-9397-08002b2cf9ae "CustID"
OtherProp = d5cdd505-2e9c-101b-9397-08002b2cf9ae "OtherProp"

  • Open regedit and go to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlContentIndexCommon create a new string key called DefaultColumnFile and enter the full path to the search.idq file e.g. c:searchsearch.idq
  • Stop the Index server, empty the catalog (right click on catalog when the server is stopped), restart the server
  • Once the server has reindexed, view the properies in the catalog again, in the management tools tree control on the left right click on the properies and select the refresh task. You should now also see the friendly names in the listing
  • Use the Query the catalog option in the tree, select the advanced option and then try a query in the form

@CustID like 1234

You should get back a link to your document

So that is all you have to do, obvious wasn't it!

I would say if it does not work first time try again, the cache/catalog refreshes do seem to need a bit of a convincing to work at times.

I can't wait for SharePoint 3 and Office Server to make this all a think of the past. So off the TechEd Barcelona now to see what I can find out about them. Maybe I will see you there.

 Some links that might shed some more light on the subject are:
http://office.microsoft.com/en-au/assistance/ha011384141033.aspx
http://www.codeproject.com/aspnet/search.asp
http://www2.tech.purdue.edu/tcn/Resources/FAQ/web/IndexServer_WP.doc