HOWTO: Query Index Server for Custom Properties with SQL Query Analyzer (240681)



The information in this article applies to:

  • Microsoft SQL Server 7.0
  • Indexing Service

This article was previously published under Q240681

SUMMARY

You can use SQL Server 7.0 to query against the Microsoft Indexing Service. This is covered in the SQL Server documentation under the topic "Full-text Querying of File Data." In some cases, it may be desirable to query against custom properties cataloged by Index Server.

MORE INFORMATION

Given the following line in a HTML page cataloged by Index Server,
<META NAME="Generator" Content="Microsoft Developer Studio">
				
the following Microsoft Knowledge Base Article explains how to query for and display the "Generator" property:

185985 Using Index Server to Query and Display META TAG Information

Notice that the Generator property must be defined before it can be used. This is true in SQL Server.

The following syntax can be used to query for the Generator property using SQL Server:
SELECT Q.FileName, Q.Size, Q.DocAuthor, Q.generator

FROM OpenQuery(FTIndexWeb, 
   'SET PROPERTYNAME ''d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1'' 
    PROPID ''generator'' 
    AS generator TYPE DBTYPE_STR;  
    SELECT FileName, Size, DocAuthor, generator
    FROM SCOPE('' "E:\Inetpub\wwwroot" '')'
    ) AS Q
WHERE Q.generator LIKE 'Microsoft Developer Studio'
				

REFERENCES

Textual Searches on File Data Using Microsoft SQL Server 7.0

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

185985 Using Index Server to Query and Display META TAG Information


Modification Type:MinorLast Reviewed:7/2/2004
Keywords:kbhowto KB240681