At 5:00 PM -0800 10/17/00, Chris Lott wrote:
>Have any of you fuseboxers dealt with creating a search engine for your
>fusebox site? I want to use Fusebox for a new project, but a major
>component of that project is somehow implementing a good site search
>mechanism. I've done this using Verity, but Fusebox seems to throw a few
>monkey wrenches into that method.
>
>Just curious what others have done.
I haven't fully implemented it yet, but here's a brief excerpt of a scheme i came up
with. It may not be the most efficient, but i think it'll work. Lemme know if you
see any glaring problems, want more detail, etc.
chris
---------------------------------------------------------------------------------
Verity and Fusebox Theory
---------------------------------------------------------------------------------
Since each page in the site is made up of a number of files, and we only want to index
a portion of those files (typically the dsp_ ones), we need to use Verity's file
indexing (in <cfindex>, specify the type as "file"). The drag is that someone not
only has to figure out which pages in the site need to be searchable, but someone also
has to create a separate call to <cfindex> for each of the page's searchable parts
(e.g., for Info on Minorities, only the dsp_SubContent.cfm should be searchable, so
only one <cfindex> tag is needed, but others will require several).
My protoype just indexes two pages in the site, but it works. If there's an easier
way, then great, but i don't know of one and didn't feel like looking for one.
---------------------------------------------------------------------------------
Verity and Fusebox Code Example
---------------------------------------------------------------------------------
<html>
<head>
<title>Verity Indexing Research for Fusebox</title>
</head>
<body>
<cfindex collection="TheCompanyCollection"
action="update"
type="file"
title="Info for Minority Students"
key="E:\wwwroot_dev1\Site\StudentLife\InfoForMinorityStudents\dsp_SubContent.cfm"
custom1="/StudentLife/index.cfm?method=InfoForMinorityStudents"
>
<cfindex collection="TheCompanyCollection"
action="update"
type="file"
title="Minority Organizations"
key="E:\wwwroot_dev1\Site\StudentLife\InfoForMinorityStudents\MinorityOrganizations\dsp_MainContent.cfm"
custom1="/StudentLife/index.cfm?method=MinorityOrganizations"
>
<cfparam name="url.term" default="">
<cfif (term neq "")>
<cfsearch name="qSearch"
collection="TheCompanyCollection"
type="simple"
criteria="#LCase(term)#">
<cfif (qSearch.RecordCount gt 0)>
<cfoutput>Found #qSearch.RecordCount# of #qSearch.RecordsSearched#</cfoutput><br>
<table border="1" cellpadding="3" cellspacing="0">
<tr valign="top">
<th>Result Number</th>
<th>URL</th>
<th>Key</th>
<th>Title</th>
<th>Score</th>
<th>Absolute URL</th>
</tr>
<cfoutput query="qSearch">
<tr valign="top">
<td>#qSearch.CurrentRow#</td>
<td>#qSearch.URL#</td>
<td>#qSearch.Key#</td>
<td>#qSearch.Title#</td>
<td>#qSearch.Score#</td>
<td>#qSearch.Custom1#</td>
</tr>
</cfoutput>
</table>
<cfelse>
term not found.
</cfif>
<cfelse>
empty search term.
</cfif>
<form action="<cfoutput>#CGI.SCRIPT_NAME#</cfoutput>" method="GET">
<input type="text" name="term" value="<cfoutput>#url.term#</cfoutput>">
<input type="submit" value="Find it!">
</form>
</body>
</html>
---------------------------------------------------------------------------------
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/fusebox or send a message
to [EMAIL PROTECTED] with 'unsubscribe' in the body.