• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF 8.01 Verity Database Search Works except for Categories

Explorer ,
Sep 23, 2008 Sep 23, 2008

Copy link to clipboard

Copied

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.
TOPICS
Advanced techniques

Views

272

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 02, 2008 Oct 02, 2008

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation