Using File Properties for File Content Searches

Accessing and Changing Relational Data

Accessing and Changing Relational Data

Using File Properties for File Content Searches

Microsoft® Indexing Service filters and maintains in excess of 50 file properties. All of these can be specified in text file search queries. From the perspective of writing a SELECT statement, there are 3 types of properties:

  • Those that can only be specified in a WHERE clause.

  • Those that can be specified in a WHERE clause and, in addition, can be specified in the ORDER BY clause.

  • Those that can be specified in a WHERE clause and, in addition, can be specified in a select list.

The table shows a list of the properties.


Property name

Data type

Description
Use in ORDER BY Use in select list
Access datetime Most recent date and time that the file was accessed. Yes Yes
Characterization nvarchar or ntext Abstract of the contents of the file. Note that, in this version of Indexing Service this is usually the first paragraph or first section of a document. In a future version, it will be an actual summary.   Yes
Contents nvarchar or ntext Main contents of the file.    
Create datetime Date and time that the file was created. Yes Yes
Directory nvarchar Physical path to the file, not including the file name. Yes Yes
DocAuthor nvarchar Document author. Yes Yes
DocComments nvarchar Comments about the document. Yes Yes
DocLastAuthor nvarchar Most recent user that edited the document. Yes Yes
DocLastPrinted datetime Date and time that the document was last printed. Yes  
DocPageCount integer Number of pages in the document. Yes  
DocPartTitles array of varchar Names of document parts:
Slide titles in Microsoft PowerPoint®
Spreadsheets in Microsoft Excel
Documents in Microsoft Word.
   
DocSubject nvarchar Subject of the document. Yes Yes
DocTitle nvarchar Title of the document. Yes Yes
DocWordCount integer Number of words in the document. Yes -
FileIndex decimal(19,0) Unique identifier of the file. Yes Yes
FileName nvarchar Name of the file. Yes Yes
HitCount integer Number of words matching query. Yes Yes
Path nvarchar Full physical path to the file, including file name. Yes Yes
Rank integer Value from 0 to 1000 indicating how closely this row matches the selection criteria. Yes Yes
Size decimal(19,0) Size of file, in bytes. Yes Yes

Customers and third-party vendors can write filters to add to this set of properties.  They can also add properties, for example, by adding their own tags to an HTML document. In addition, to permit the query and retrieval of such user-defined properties, the Transact-SQL extensions to Indexing Service include support for a SET statement that allows the specification of new property names and their associated types.