Microsoft KB Archive/223298

= How To Query for META Properties That Contain Dash Characters =

Article ID: 223298

Article Last Modified on 7/2/2004

-

APPLIES TO


 * Microsoft Site Server 3.0 Standard Edition

-



This article was previously published under Q223298



SUMMARY
It is not possible to define a property in a Search catalog that contains a dash "-" character in the name. If a document defines a property that contains a dash, it is possible to reference this property via a name that does not contain a dash.



MORE INFORMATION
Consider the following META tag:  If an HTML file containing this META tag is cataloged by Search, you can find the document with the following query: @meta_corp-sponsor Microsoft In order to search for and retrieve a document property in Search, it is necessary to add that property to the Search schema and mark the property with the Index and Retrieve flags. It is not possible to define a property in Search with a dash ("-") character in the name.

The following steps enable the searching and retrieval of the META property defined by the above META tag.   Add the property to the Site Server Schema with the following settings: Property name: corp_sponsor Property set:  HTML Meta Property ID:   corp-sponsor Type:          string Index:         yes Retrieve:      yes  Rebuild the Search catalog.  Define a column for the Query object, which references the META property: Q.DefineColumn "corp_sponsor = d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1 corp-sponsor" The column can also be defined in the Definecolunms.txt file (see REFERENCES below)   Add the column to the Query Object columns collection: Q.Columns = "DocTitle, DocAddress, Description, corp_sponsor" You can now search for the corp-sponsor property with the following syntax: @corp_sponsor Microsoft You can also display the value of corp-sponsor by referencing corp_sponsor in the record set returned by the Query object: "><% = DocTitle %> corp-sponsor = <% = RS("corp_sponsor")%> </ol>

Pay very close attention, when working with the instructions above, to the difference in placement between corp-sponsor and corp_sponsor.

<div class="references_section">