Controlling the Search (.Idq File)

Note

Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.

 

The Internet Data Query (.idq) file defines query parameters such as the scope of your search, any restrictions, and query results sets. The following example shows a basic .idq file:

[Query]
# CiCatalog=d:\ <= COMMENTED OUT - default registry value used
CiColumns=filename,size,rank,characterization,vpath,DocTitle,write
CiRestriction=%CiRestriction%
CiMaxRecordsInResultSet=300
CiMaxRecordsPerPage=10
CiScope=/
CiFlags=DEEP
CiTemplate=/iissamples/issamples/ixtourqy.htx
CiSort=rank[d]
CiForceUseCi=true

The following list explains each line of the sample .idq file:

[Query]

Identifies the following information as a query restriction.

CiCatalog=d: \

Points to the index to use. In this case, the statement is commented out, so a default is used.

CiColumns=filename,size,rank,characterization, vpath,DocTitle,write

Indicates the kind of information to return in the result set.

CiRestriction=%CiRestriction%

Indicates the query terms to search for. In this case, the CiRestriction form parameter is used.

CiMaxRecordsInResultSet=300

Sets the maximum number of results to be returned; in this example, 300.

CiMaxRecordsPerPage=10

Determines how many results are shown on each webpage returned. In this case, 10 results will be shown per webpage.

CiScope=/

Tells where to start the query. In this example, the query starts at the root of the virtual directory space. You can list more than one virtual directory in your scope by separating the directories with a comma (,). For example: CiScope=/docs,/work,/school

CiFlags=DEEP

Instructs the query to search all subdirectories within the scope.

CiTemplate=/iissamples/issamples/ixtourqy.htx

Indicates which file to use to format the results; in this case, Ixtourqy.htx.

CiSort=rank[d]

Tells how to sort the results. This example calls for results to be listed in descending [d] rank order; that is, the results are listed in order from the file with the most hits to the file with the least hits.

CiForceUseCi=true

This is an optional variable that, when set to TRUE, forces Indexing Service to search the content index even if it is out of date.

When the results are returned in raw format, Indexing Service formats the results according to the .htx file specified in the CiTemplate parameter.

For details about the .idq file and how to format it, see Internet Data Query Files.