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

CFSearch and CFIndex and Categories

Guest
May 24, 2006 May 24, 2006

Copy link to clipboard

Copied

Here is my CFSEARCH syntax

=======

<cfsearch name="apnewsSearch"
collection="#CGI.SERVER_NAME#_apnews"
criteria="astros"
contextpassages="1">

=======

The resulting <cfdump var=”#apnewssearch#”> looks like the below. There are more results but I just posted one

=cfdump results reformatted for display======

Author = [empty string]
Category = news
CategoryTree = /sports/baseball/news
Key = D8HMENHO2.xml
Context = ... thing contributing to the <b>Astros</b>'

=The Problem======

So in theory I should be able to put in the “categoryTree” and “category” attributes in the CFSearch (like below). ***The search yields no results. ***

=======

<cfsearch
name="apnewsSearch"
collection="#CGI.SERVER_NAME#_apnews"
criteria="astros"
categoryTree="/sports/baseball/news"
category="news"
contextpassages="1">

=======

Note: I’ve tried a combination of categoryTree and category attributes … I’ve tried just include them separately … nothing works

What am I missing?

TOPICS
Advanced techniques

Views

1.4K

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 ,
Nov 17, 2006 Nov 17, 2006

Copy link to clipboard

Copied

I am having the same problem was wondering if you ever got it to work?

<cfindex
collection = "test"
action = "update"
type = "path"
key = "e:/meetings/noonboard/"
category = "noonbd"
categorytree="/meeting/current"
URLpath = "/meetings//noonboard/"
extensions = ".htm, .html, .doc, .pdf, .ppt, .xls, .cfm, .txt, .rtf"
recurse = "no"
language = "English"
status = "result">

And this returns no results. Take out the category attrib and it works fine, and the dump shows both the category and category tree as expected. Am running 7.0.2 in Win2k in j2ee mode and each time I change the name of the searchresults to make sure I am not searching a cached search

<cfsearch
name = "searchresults"
collection = "test"
category = "noonbd"
categorytree=""
status = "info"
criteria = "*"
maxRows = "10"
>

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
Explorer ,
Nov 20, 2006 Nov 20, 2006

Copy link to clipboard

Copied

I think I have figured out what is wrong, and am posting in case anyone else runs into this problem.
When I first created the collection, I indexed it without category or categorytree attribs. When I wanted to test those aspects, I purged the indexes and added the category and categorytree attribs to the cfindex tag. Even though the columns in the cfsearch result set showed the category and categorytree columns populated as I expected, dumping the collection action="categorylist" showed no categoies or categorytrees defined. BUT, after I deleted the collection and then indexed it with the cateory and categorytree attribs in the cfindex, it worked as expected.

So, if you canot use the category or ccategorytree attribs in your cfsearch tags, delete and recreate the index with the category and categorytree attribs and it should work.

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
Advocate ,
Sep 14, 2012 Sep 14, 2012

Copy link to clipboard

Copied

LATEST

Sorry for waking up an almost six year old thread but I had to say thank you for posting this. I had the exact same issue and have been fighting with this for a couple hours now and then I found this post. I deleted the collection and recreated it -- presto, everything works! Now to go through and remove the various cfdumps and turn off debugging...

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