Skip to main content
Inspiring
September 23, 2008
Question

CF 8.01 Verity Database Search Works except for Categories

  • September 23, 2008
  • 1 reply
  • 310 views
Does anyone have categories working with a database search and can give a good example or insights for the problem below? My CF8.01 code works fine for Verity searches so far until i add Categories. Maybe I'm doing something wrong. I followed the docs, but they did not shed any light on this.

I create the collection called "diadocimageadv" in the Administrator with Categories set to yes.

I create update and refresh functions for it as follows for example that seem to run without errors:
<cfindex attributeCollection="#commonArgs#" action="Refresh" />
Where commonArgs is defined below and qRead is a valid query result set (again works fine without category and I limit it to 100 records during this test):
<cfscript>
var commonArgs = structNew();
commonArgs.query="qRead";
commonArgs.collection="diadocimageadv";
commonArgs.type="Custom";
commonArgs.key="diadocumentkey";
commonArgs.title="DIA Search";
commonArgs.language="englishx";
commonArgs.category="Condition Report, Data Card";
commonArgs.CUSTOM1="diasubdoctypename";
commonArgs.CUSTOM2="diadocumentdate";
commonArgs.CUSTOM3="diadocno";
commonArgs.CUSTOM4="diadocsubject";
commonArgs.body="diadocumentkey, diadoctypename, diasubdoctypename, ...[more fields here]";
</cfscript>

I then call the function from a page to refresh the collection and it runs without errors.

Then I have another function that my cfgrid calls to run the search that includes (where strdoctype equals 'Condition Report' for example based on a user choice) and again no errors are thrown, just null valued data:

<cfsearch
attributeCollection="#commonArgs#"
category="#Trim(strdoctype)#"
collection = 'diadocimageadv' />

where commonArgs is defined as:

<cfscript>
var commonArgs = structNew();
commonArgs.name="qRead";
commonArgs.type="Internet";
commonArgs.criteria="#strsearchmetadata#";
commonArgs.ContextHighlightBegin = '<span class=context>';
commonArgs.ContextHighlightEnd = '</span>';
commonArgs.contextPassages = '1';
commonArgs.contextBytes = '60';
commonArgs.maxrows = '100000';
</cfscript>

Firebug shows the results coming back have nulls where I expect my data. I define my search criteria based on my SQL Server 2005 query results (the one limited to 100 records) that I just ran based on the collection that is supposed to be generated.
This topic has been closed for replies.

1 reply

BrianOAuthor
Inspiring
October 2, 2008
I ran into other problems with Verity including trying to use it with cfgrid, so I gave up and used SQL Server '05 to do the job and it was faster and took less code anyway for my job.