[thelist] CFML Search Interface

Seth Bienek seth at sethbienek.com
Tue Jan 23 14:02:31 CST 2001


Het Matt,

The best thing to do is to not have those files indexed into the collection
to begin with.  Excluding them in your output means that every record
returned has to be processed before the page can be displayed; it may be a
performance hit you're not willing to accept, especially since it could be
avoided with proper indexing.

BUT, if you have no choice in the matter, and the index type is "path", then
verity uses the path of the file in the index as the key.  So you could
exclude paths in your output results like so...

Note that the stuff I added is commented to your original code...

<CFSEARCH Name="results"
Collection="ddresort"
type="simple"
criteria="#Form.CRITERIA#">
<Table border=0 cellpadding=3>
<TR>
<td>SCORE</td>
<td>TITLE</td>
</tr>
<CFOUTPUT query="results">
<!--- Exclude search results from protected directory. --->
<!--- notice that the length in the left() function is exual to
	the length of the path string. --->
<cfif left(results.key, 29) is NOT "c:\inetpub\wwwroot\foo\admin\">
<TR>

<TD>#SCORE#</td>
<TD><A href="#URL#">#TITLE#</a></td>
</tr>
<!--- Close IF statement --->
</cfif>
</cfoutput>
Seth

------------------------------
Seth Bienek
Solutions Development Manager
Stonebridge Technologies, Inc.
972.455.7294 tel
972.404.9754 fax
ICQ #7673959
------------------------------

> -----Original Message-----

> The question I have is I have a members only folder in my root directory
> that I would like to disallow my search interface from displaying files
> within this folder.  I am wondering if there is a way to do this.  I
> appreciate any ideas on this matter.
>





More information about the thelist mailing list