Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hit Highlighting of SQL Content Search Results

Status
Not open for further replies.

Rachel80

Programmer
May 25, 2000
63
GB
I found the following coding in the Index Server 2.0 Sample Navigation Frameset from Microsoft Index Server:<br><br>&lt;%<br>Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)<br>Conn.ConnectionString =&nbsp;&nbsp;&quot;provider=msidxs;&quot;<br>Conn.Open<br>Set AdoCommand = Server.CreateObject(&quot;ADODB.Command&quot;)<br>set AdoCommand.ActiveConnection = Conn<br>Set Recordset = Server.CreateObject(&quot;ADODB.RecordSet&quot;)<br>AdoCommand.Properties(&quot;Bookmarkable&quot;) = True<br>AdoCommand.CommandText = &quot;select vpath, filename from scope() where contains('Index AND Server')&gt;0&quot;<br>Recordset.open AdoCommand<br>SearchString = AdoCommand.Properties(&quot;Query Restriction&quot;)<br>%&gt;<br>&lt;%if SearchString &lt;&gt; &quot;&quot; then%&gt;<br>&lt;BR&gt;<br>&nbsp;&nbsp;&lt;%<br>&nbsp;&nbsp;' Construct the URL for hit highlighting<br>&nbsp;&nbsp;WebHitsQuery = &quot;CiWebHitsFile=&quot; & Server.URLEncode( Recordset(&quot;vpath&quot;) )<br>&nbsp;&nbsp;WebHitsQuery = WebHitsQuery & &quot;&CiRestriction=&quot; & Server.URLEncode( SearchString )<br>&nbsp;&nbsp;WebHitsQuery = WebHitsQuery & &quot;&CiBeginHilite=&quot; & Server.URLEncode( &quot;&lt;font color=&quot;&quot;#FF0000&quot;&quot;&gt;&lt;b&gt;&lt;em&gt;&quot; )<br>&nbsp;&nbsp;WebHitsQuery = WebHitsQuery & &quot;&CiEndHilite=&quot; & Server.URLEncode( &quot;&lt;/em&gt;&lt;/b&gt;&lt;/font&gt;&quot; )<br>&nbsp;&nbsp;WebHitsQuery = WebHitsQuery & &quot;&CiUserParam3=&quot; & QueryForm<br>&nbsp;&nbsp;%&gt;<br>&nbsp;&nbsp;&lt;a href=&quot;/iissamples/issamples/Oop/Qsumrhit.htw?&lt;%= WebHitsQuery %&gt;&quot;&gt;&lt;b&gt;Show Highlights (condensed)&lt;/b&gt;&lt;/a&gt; /<br>&nbsp;&nbsp;&lt;a href=&quot;/iissamples/issamples/Oop/Qfullhit.htw?&lt;%= WebHitsQuery %&gt;&CiHiliteType=Full&quot;&gt;&lt;b&gt;Show Highlights (full<br>text)&lt;/b&gt;&lt;/a&gt;<br>&lt;BR&gt;<br>&lt;%end if%&gt; <br><br>It's used for Webhits rite? Can everyone explain the meaning of those coding? or is there any site where I can find info about computing the webhits? Thanks a millions!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top