Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Sgt Sarin #1
Verity not searching/returning all fields correctly.
My web host is running ColdFusion MX 6.1
I have recently begun constructing Verity collections and indexing them.
I am having issues in which some records are not being retrieved (when they
clearly should be).
For example, I have 21 rows in my database (that has been indexed into a
Verity collection) that contain the text "St. Lawrence". A text search for
"St. Lawrence" (with, or without quotation marks) returns only 10 results. Of
those ten results, not one happens to be one of the records that has "St.
Lawrence" in the title of the record.
It is as if Verity isn't searching all of the fields specified in the BODY
attribute of the CFINDEX tag.
I know there was a bug in CF5.5 with search strings that contained periods (.)
and hyphens (-) but I have verified that my web host is running CFMX6.1 ( and I
was unable to find a fix for 6.1 similar to that listed in the knowledgebase
for 5.5)
Here is my code - any suggestions would be much appreciated.
----Index code-----
<CFQUERY NAME="rsProductResults" DATASOURCE="#request.dsn#"
USERNAME="#request.dsnUsername#" PASSWORD="#request.dsnPassword#">
SELECT * FROM tbl_products
</CFQUERY>
<CFLOCK NAME="products_collection_update" TYPE="EXCLUSIVE" TIMEOUT="30"
THROWONTIMEOUT="NO">
<CFINDEX ACTION="REFRESH"
COLLECTION="product_collection"
QUERY="rsProductResults"
KEY="product_id"
TYPE="CUSTOM"
BODY="product_name,product_description">
</CFLOCK>
----------------
------CFSearch code -------------
<CFLOCK TYPE="EXCLUSIVE" NAME="EZODSearch" THROWONTIMEOUT="NO" TIMEOUT="30">
<CFSEARCH
COLLECTION="ezod_products"
LANGUAGE="ENGLISH"
NAME="VerityResults"
CRITERIA="#lcase('#URL.keywords#')#">
</CFLOCK>
<CFPARAM NAME="VerityResults.RecordCount" DEFAULT="0">
<CFIF VerityResults.RecordCount NEQ 0>
<CFQUERY NAME="rsGetResults" DATASOURCE="#request.dsn#"
USERNAME="#request.dsnUsername#" PASSWORD="#request.dsnPassword#">
SELECT *
FROM tbl_products
WHERE product_ID IN (#ValueList(VerityResults.key)#)
</CFQUERY>
</CFIF>
<CFIF rsGetResults.RecordCount NEQ 0>
<strong><cfoutput>#rsGetResults.RecordCount# results
found.</cfoutput></strong><BR><BR>
<CFOUTPUT QUERY="rsGetResults">
#Product_ID# - <A HREF="Details.cfm?ProdID=#product_ID#">#Product_Na me#</A><BR>
#Product_ShortDescription#<BR>
<HR WIDTH="300" ALIGN="LEFT">
</CFOUTPUT>
</CFIF>
Sgt Sarin Guest
-
Verity for Fast Text Searching Macrochat
Verity for Fast Text Searching Macrochat Wednesday, August 17, 2005 12:00 PM - 1:00 PM US/Eastern Want to do free text searches like Google in... -
Verity Indexing and Searching
I have used a process for searching Cold Fusion powered sites for years. It's quite simple, really: I create a set of Verity collections pertinent... -
Verity - cfsearch not returning results on subsequentgets
We have no problem returning results from searches with CF server 5. We are now moving to CF Server MX. With an initial search, the result set is... -
Using Verity to search BLOB fields in DB
Hello All! We have an Oracle 9i database with a table containing documents (PDF, Word, Excel, etc) stored in that table in a BLOB column. We want... -
#26315 [Opn->Bgs]: mssql_fectch_* functions are returning a space char on empty fields
ID: 26315 Updated by: iliaa@php.net Reported By: webmaster at cbre dot fr -Status: Open +Status: ... -
Chicerjunge #2
Re: Verity not searching/returning all fields correctly.
I am having the same problem trying to build a search engine. The period is throwing everything off. I have multiple fields in 'body' also.
It seems that any search without the period is ok.
Chicerjunge Guest
-
Chicerjunge #3
Re: Verity not searching/returning all fields correctly.
I did want to tell you that using the cf_title does work containing periods. It's like my body isn't picking up the right stuff. Perhaps there is a limit to how much body can take?
Chicerjunge Guest
-
mleder4 #4
Re: Verity not searching/returning all fields correctly.
I would have to chime in here and state that Verity is broken in V7.
Here's why:
I upgraded from v6.1 Std to v7 Std this past weekend. In v6.1 all searching
worked perfectly for 2+ years. I use collections built from SQL queries
obtained from MS-Access (I know, I know - don't bash me for using Access, it's
a client decision).
As an example, a search on a small 270 recordset containing an ID, question
and answer is done on the word "Fact". Up pops 15 records. Good. However, a
search is performed on "Factoid" - no results. In 6.1 both search terms would
return results, in 7.0 only the word "Fact" returns results. The data was
entered by the client in January 2005, so we know it was working for several
months.
Problem solving on my end:
1) deleting and recreating the collections in the Cfadmin area, and reindexing
the collections - no resolution.
2) Installing the CFMX7 hotfix 2, which addresses some verity problems.
Restart CFMX7, delete and recreate collections from CFAdmin console,
reindexing the collections - no resolution.
3) Deleting the actual record from the db, then reinserting the record as new,
then reindexing - no resolution.
FYI - prior to reindexing, the Access db is compacted to make sure there are
no errors.
Here's the actual question text for this record:
Fact or Factoid - the addition of copper pennies to vase water increases the
life of tulips?
What's really weird is that this phrase will not even show up in the search
for "fact". Hmm, does the non-Unicode of this MS-access db have an effect?
Here's the code I use for indexing and searching (I have made no changes to
this code in 2+ years of use):
<!---Index the contents of the query object using CFINDEX---> <cflock
name="cfindexFAQ_lock" type="EXCLUSIVE" TIMEOUT="30">
<CFINDEX ACTION="REFRESH"
COLLECTION="faq_db"
KEY="faq_ID"
TYPE="CUSTOM"
TITLE="question"
QUERY="indexdb"
BODY="question,answer"
LANGUAGE="English">
</cflock>
<cfsearch collection="faq_db" NAME="v_faq" TYPE="SIMPLE"
CRITERIA="#FORM.criteria#">
Anyone else having these problems? Is this a bug, or are there code changes
in the cfindex routine that I need to tweak from 6.1 to 7.0?
If this can't be fixed, is there a way to run 6.1 Verity again, disable 7.0
verity, but keep 7.0 as the primary application server?
mleder4 Guest



Reply With Quote

