3 Replies Latest reply on Sep 14, 2012 3:24 PM by Steve Sommers

    CFSearch and CFIndex and Categories

      Here is my CFSEARCH syntax


      <cfsearch name="apnewsSearch"


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




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

      What am I missing?

        • 1. Re: CFSearch and CFIndex and Categories
          I am having the same problem was wondering if you ever got it to work?

          collection = "test"
          action = "update"
          type = "path"
          key = "e:/meetings/noonboard/"
          category = "noonbd"
          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

          name = "searchresults"
          collection = "test"
          category = "noonbd"
          status = "info"
          criteria = "*"
          maxRows = "10"
          • 2. Re: CFSearch and CFIndex and Categories
            Spidre Level 1
            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.
            • 3. Re: CFSearch and CFIndex and Categories
              Steve Sommers Level 4

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