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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search finds 2 records, only displays 1 (URGENT)

Status
Not open for further replies.

rmz8

Programmer
Aug 24, 2000
210
US
I am using Verity to search database fields. I've used record count to find out how many records were found during the search. It says 2 when I enter the key word 'stock options' (with out the quotes), but only one record appears.

To see what I'm talking about, enter 'stock options' (without the quotes) into the text box at the site below.


Here is CFML for my search page:

================================

<html>
<head>
<CFQUERY NAME=&quot;Search&quot; DATASOURCE=&quot;myjobcoach&quot; BLOCKFACTOR=&quot;100&quot;>SELECT * FROM Content_Database WHERE Show LIKE '%Yes%'</CFQUERY>
<CFQUERY NAME=&quot;Design&quot; DATASOURCE=&quot;myjobcoach&quot; BLOCKFACTOR=&quot;100&quot;>SELECT Client_Name, Title, Font, Body_Attribute1, Body_Attribute2, Body_Attribute3, Body_Attribute4, Header, SearchResults_Body, Footer FROM Site_Structure WHERE Client_Name LIKE '%#Form.Client_Name#%'</CFQUERY>
<CFINDEX ACTION=&quot;REFRESH&quot; COLLECTION=&quot;Search&quot; KEY=&quot;ID&quot; type=&quot;CUSTOM&quot; TITLE=&quot;Headline&quot; QUERY=&quot;Search&quot; BODY=&quot;Body&quot; LANGUAGE=&quot;English&quot;>
<CFSEARCH NAME=&quot;SearchDB&quot; COLLECTION=&quot;Search&quot; TYPE=&quot;Simple&quot; CRITERIA=&quot;#Form.Keywords#&quot; LANGUAGE=&quot;English&quot;>
<title></title>
</head>

<CFOUTPUT QUERY=&quot;Design&quot;><body bgcolor=&quot;#Body_Attribute1#&quot; link=&quot;#Body_Attribute2#&quot; alink=&quot;#Body_Attribute3# vlink=&quot;#Body_Attribute4#&quot;>
<font face=&quot;#Font#&quot;>
#Header#
<div align=&quot;center&quot;><font size=&quot;3&quot;>Your search for <b>&quot;#Form.Keywords#&quot;</b> returned #SearchDB.RecordCount# result(s)</font></div><br>
<CFIF SearchDB.RecordCount EQ &quot;0&quot;>
There are no articles to display.<br><br>
<CFELSE>
<a href=&quot;display_article.cfm?ID=#SearchDB.Key#&Client_Name=#Design.Client_Name#&quot;><b>#SearchDB.Title#</b></a><br><i>#SearchDB.Summary#</i>
</CFIF><br>
#Footer#</font>
</body></CFOUTPUT>
</html>

================================
[sig]<p>Ryan ;-]<br>[/sig]
 
I am afraid my test of your search box didn't fair well.
(timed out)

If the data in the database is relatively &quot;static&quot;, or gets updated by another process (ie; a spider), The verity collection should only be updated then.

Possible refreshing your collection on every &quot;search&quot; is causing the timeout?

It may be better to seperate the &quot;updating&quot; of the verity collection from the search page. I have a little script I run at the end of the day that &quot;purges&quot; and rebuilds the collections because I post a lot of data to cfhub.com every day, both web pages and database content. If you have a &quot;stock grabber&quot;, have it update your collection after it updates the database.

I will check back (maybe the server is way swamped?)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top