Ask a Question related to Coldfusion Database Access, Design and Development.
-
AAOS #1
verity and database
I am trying to create a Verity collection from a database table using a query.
It appears the collection is created but the search never finds any data.
Dpes anyone have any experience with this use of Verity? Thanks, Pam
Code to create the collection
<CFQUERY NAME="AllThreads" DATASOURCE="Consumers">
select *
from fact_master
WHERE fact_master.publish='Yes'
</cfquery>
<cfindex query="AllThreads"
collection="YOCcoll"
action="Refresh"
type="Custom"
key="Thread_ID"
title="Thread_ID"
body="Thread_ID,consumer_type,topcategory,Name,int ro">
<cfoutput query="AllThreads">
#Thread_ID# #consumer_type# #topcategory# #Name# #intro#
</cfoutput>
Code to enter search criteria
<FORM action="yoc_result.cfm" method="post">
<INPUT type="hidden" name="StartRow" value="1">
<TABLE>
<TR>
<TD>Keywords:</TD>
<TD><INPUT type="text" name="Criteria" size="30"></TD>
</TR>
<TR>
<TD>Max Rows:</TD>
<TD><SELECT name="MaxRows"> <OPTION> 10 <OPTION> 25 <OPTION> 100
</SELECT></TD>
</TR>
<TR>
<TD colspan=2><INPUT type="submit" value=" Search "></TD>
</TR>
</TABLE>
</FORM>
Code to display results
<!--- template settings --->
<CFSET SearchDirectory = "\\NT14\consumer">
<CFSET SearchCollection = "YOCcoll">
<CFSET UseURLPath = "YES">
<!--- retrieve requested files --->
<CFSEARCH
name = "GetResults"
collection = "#SearchCollection#"
criteria = "#Form.Criteria#"
maxRows = "#Evaluate(Form.MaxRows + 1)#"
startRow = "#Form.StartRow#"
>
<HTML><HEAD>
<TITLE>Your Orthopaedic Connection - Search Results</TITLE>
</HEAD><BODY bgcolor="#FFFFFF">
<FONT size="+1">Your Orthopaedic Connection</FONT> <BR>
<FONT size="+2"><B>Search Results</B></FONT>
<P>
<!--- no files found for specified criteria? --->
<CFIF GetResults.RecordCount is 0>
<B>No files found for specified criteria</B>
<!--- ... else at least one file found --->
<CFELSE>
<TABLE cellspacing=0 cellpadding=2>
<!--- table header --->
<TR bgcolor="cccccc">
<TD><B>No</B></TD>
<TD><B>Score</B></TD>
<TD><B>File</B></TD>
<TD><B>Title</B></TD>
</TR>
<CFOUTPUT query="GetResults" maxRows="#Form.MaxRows#">
<TR bgcolor="#IIf(CurrentRow Mod 2, DE('FFFFFF'), DE('FFFFCF'))#">
<!--- current row information --->
<TD>#Evaluate(Form.StartRow + CurrentRow - 1)#</TD>
<!--- score --->
<TD>#Score# </TD>
<!--- file name with the link returning the file --->
<TD>
<CFIF UseURLPath> <!--- URL parameter from cfsearch contains URL path info
--->
<CFSET href = Replace(URL, " ", "%20", "ALL")>
<CFELSE> <!--- ... else use OpenFile to return the file --->
<CFSET href =
"MyApplication_VOpenFile.cfm?serverFilePath=#URLEn codedFormat(Key)#">
</CFIF>
<A href="#href#">#GetFileFromPath(Key)#</A>
</TD>
<!--- title for HTML files --->
<TD>#Title# </TD>
</TR>
</CFOUTPUT>
</TABLE>
<!--- CFSEARCH tried to retrieve one more file than the number specified in
the
Form.MaxRows parameter. If number of retrieved files is greater than MaxRows
we know that there is at least one file left. The following form contains
only
one button which reloads this template with the new StartRow parameter. --->
<CFIF GetResults.RecordCount gt Form.MaxRows>
<FORM action="yoc_result.cfm" method="post">
<CFOUTPUT>
<INPUT type="hidden" name="Criteria" value="#Replace(Form.Criteria, """",
"'", "ALL")#">
<INPUT type="hidden" name="MaxRows" value="#Form.MaxRows#">
<INPUT type="hidden" name="StartRow" value="#Evaluate(Form.StartRow +
Form.MaxRows)#">
<INPUT type="submit" value=" More ... ">
</CFOUTPUT>
</FORM>
</CFIF>
</CFIF>
</BODY></HTML>
A wizard was used to create the search and results pages
AAOS Guest
-
Verity
I need help with how Verity scores documents. I need my results to always be in the following order 1) All cfm pages with metadata matching search... -
Help about verity?
hi, all, I create a verity collection on cf7, and the collection has 13 catalogs. A scheduled task of cfindex page to update the collection every... -
Verity to search database?
I am currently using Verity on CF 6.1 to search through indexed web/cfm pages. I thought I recall that you could set it up to search through... -
verity and database collection
I am trying to create a Verity collection from a database table using a query. It appears the collection is created but the search never finds any... -
Verity - what does this mean?
I have a verity search which looks for a key word in a group of documents. The search is not bring back results from specific criteria in the...



Reply With Quote

