Microsoft KB Archive/238742

= Query Modifications Display at Top of Results Page =

Article ID: 238742

Article Last Modified on 9/11/1999

-

APPLIES TO


 * Microsoft Index Server 2.0

-



This article was previously published under Q238742



SYMPTOMS
When you use a custom query in your IDQ file, the code you append to the user's query is displayed on the results page. In other words, if you query on "enhance" without modifying the CiRestriction line, you will see the following text at the top of the results page:

Documents 1 to 10 of 15 matching the query "enhance".

However, if you use the CiRestriction line to add to the user's query (excluding directories, and so on), you will see the following:

Documents 1 to 10 of 15 matching the query "enhance" &! #vpath *\_vti*

In some cases, this addition to the user's query can confuse the user, and administrators do not want it displayed.

Note: This only occurs when you use the HTM/IDQ/HTX combination. The ASP file does not have this issue; it handles the results page correctly automatically.



RESOLUTION
To prevent the custom query from appearing on the results page, use the following steps:   In your IDQ file, find the CiRestriction line; it will look as follows:

CiRestriction=%if FreeText eq on% $contents "%CiRestriction%" %else% %CiRestriction% # %endif%   Change any instance of "%CiRestriction%" in that line to "%UserRestriction%". The line above will read as follows:

CiRestriction=%if FreeText eq on% $contents "%UserRestriction%" %else% %UserRestriction% # %endif%   In the following sample of code from the default HTX file, do not make any changes to these lines when you reach step four; these lines require the CiRestriction variable.

&CiRestriction=<%escapeURL CiRestriction%>&CiQueryFile=/iissamples/issamples/query.idq&CiBeginHilite=<%escapeURL %>&CiEndHilite=<%escapeURL %>&CiUserParam3=../<%escapeURL HTMLQueryForm%>"> Summary

&CiRestriction=<%escapeURL CiRestriction%>&CiQueryFile=/iissamples/issamples/query.idq&CiBeginHilite=<%escapeURL <b class=Hit>%>&CiEndHilite=<%escapeURL </b>%>&CiUserParam3=../<%escapeURL HTMLQueryForm%>&CiHiliteType=Full"><IMG src="hilight.gif" align=middle alt="Highlight matching terms in document."> Full</a> </li> Go through your HTM, IDQ, and HTX files and replace every instance (not referenced above) of "CiRestriction" with "UserRestriction." When you have completed this, the word "CiRestriction" should appear only three times in all three files, at the beginning of the line referred to in step 1 and step 2 above, and in the two lines referred to in step 3 above. Of course, if the instance of "CiRestriction" that you are replacing has percent signs (%) around it, do not delete it; the only thing that will change is the text between them.</li></ol>

Keywords: kbprb kbpending KB238742

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.