How to Set Up Site Server Search to Use Custom Microsoft Office Properties (245260)



The information in this article applies to:

  • Microsoft Site Server 3.0
  • Microsoft Site Server 3.0 Commerce Edition

This article was previously published under Q245260

SUMMARY

This article covers the steps needed to create a custom search query based on the properties of Microsoft Office documents.

MORE INFORMATION

  1. Start Microsoft Word. Either create or open the document you wish to tag, and select Properties from the File menu.
  2. Under the Custom tab, type CustomProperty for the name, leave the Type as Text, and type CustomPropertyValue as the value.
  3. Click Add and Close.
  4. Save the document and close Microsoft Word.
  5. Create a new search catalog called CustomPropertyCatalog. Do a file crawl against the directory containing the document modified above, but don't start the crawl yet.
  6. Expand the catalog under Catalog Build Server and select Schema. Click Add, and fill out the page as follows:
    Property Name:CustomProperty
    Other Property Set:d5cdd505-2e9c-101b-9397-08002b2cf9ae
    Property ID:CustomProperty
    Type:String
    Index:Yes
    Retrieve:Yes

    If prompted, create a custom schema.

  7. Now that the property has been added to the schema, perform a full build on the catalog. The next two steps modify the page that displays your search results. Please refer to the online documentation and the Knowledge Base articles below for more information on how to create this page.

  8. Modify your search results page and define a column for the custom property similar to the following:
    Set objQuery = Server.CreateObject ("MSSearch.Query")
    objQuery.Catalog = "CustomPropertyCatalog"
    objQuery.Query = "#Filename *.doc"
    objQuery.DefineColumn "CustomProperty (DBTYPE_STR | DBTYPE_BYREF)= D5CDD505-2E9C-101B-9397-08002B2CF9AE CustomProperty"
    objQuery.Columns = "Title, DocAddress, Description, Rank, CustomProperty"
    						

    This query returns all Microsoft Word files in our catalog and also explicitly retrieves the value of the CustomProperty property.

  9. Changing the query text to the following:

    objQuery.Query = "@CustomProperty CustomPropertyValue"
    						

    It only return documents within the catalog where CustomProperty is set to CustomPropertyValue.

243724 An Example Search Results Page Utilizing a SQL-Style Query for Site Server Search


197607 Office Custom Property Is Not Searchable


Modification Type:MajorLast Reviewed:5/15/2006
Keywords:kbhowto KB245260