coldfusioncoldfusion-10cfsearch

CFSearch not returning results when using criteria


I followed the steps from Ray Camden's website to use the data import handlers for indexing a collection. My collection is being populated but when I try to use cfsearch to return results it comes back empty if I add a criteria to the search. Without a criteria results are returned.

Here is the cfsearch tag I am using - has anyone else had similar issue and if so how did you resolve it?

<cfsearch name="mySearch"
          collection="FORD OEM"
          maxRows="200"
          criteria="window"
          type="dismax">

Update:

I was able to make some progress. If do searches like this, where I specify the column name in the criteria, they return results. (I was unable to get any of the examples on the adobe web site to work.)

<cfsearch name="mySearch" 
         collection ="FORD OEM" 
         maxRows="200" 
         criteria="description:window" 
         type="standard" /> 

Solution

  • It turns out that when a column is not specified in the criteria, cfsearch by default looks for a column named contents which I had not created in the dataconfig.xml or referenced in the schema.xml file. When I added the contents column it worked as expected.