Hi Guys,

I'm trying to build an index for search, and I am hitting some snags.
When someone creates an ad, I want to update lucene via cfindex. Once
the ad is created, I get the unique ID of that ad, and it is set to
equal 'CID'. so, #cid# equals the unique id. Below is the basic code I
am using to create the collection, followed by the code to update the
collection of the new entry.

Problem is, I thought the KEY value should be equal to the unique key
value of the entry, aka the unique ID of the ad that is posted.
However, I am getting the following error "Invalid KEY value, must be
a file path: 18" (18 being the unique key value I passed)

I guess what I need to do is create an if/then statement that checks
to make sure the "collection" is present, otherwise, it will create
it. Then all of that is followed by the code for the actual cfindex
update.

Can someone look at this and tell me what I'm doing wrong here? Once I
get this to work, I will add to the body field to make the index more
complete.

<CFCOLLECTION action="create" collection="ads">

<cfindex        action="update" collection="ads" key="#CID#"
body="#FORM.title#, #FORM.description#">

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 mailing list - http://groups.google.com/group/openbd?hl=en

 !! save a network - please trim replies before posting !!

Reply via email to