HOWTO: Query for META Properties That Contain Dash CharactersID: Q223298
|
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.
Consider the following META tag:
<meta name="corp-sponsor" content="Microsoft">
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.
Property name: corp_sponsor
Property set: HTML Meta
Property ID: corp-sponsor
Type: string
Index: yes
Retrieve: yes
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)
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:
<a href="<% = RS("DocAddress")%>"><% = DocTitle %></a> corp-sponsor = <% = RS("corp_sponsor")%><br>
Site Server Documentation - "Columns Derived from META Tags"
Additional query words:
Keywords : prodsitesrv3
Version : winnt:3.0
Platform : winnt
Issue type : kbhowto
Last Reviewed: July 8, 1999