views:

85

answers:

1

Hi, everyone.

I am using ColdFusion 9, with create a verity collection name 'shopColl'. I create a task schedule to call a CFM file to do indexing this collection every 5 minutes.

but I found this error when I try to refresh index in collection:

An error occurred while performing an operation in the Search Engine library.; DETAIL:The collection is not available.: com.verity.coll.VCollectionNotAvailableException: Collection down after opening. (10) 

Could you help me how to solve this? the process seems correct before until this night.

The code below, is in CFM file that task schedule will invoke in routine.

<cfprocessingdirective  suppresswhitespace="true">

<cftry>
    <!--- pull the content --->
    <cfquery datasource="shop" name="shop.getContent">
        SELECT * 
        FROM shop
    </cfquery>


    <!--- update collection --->
    <cflock name="cfindex_lock" type="exclusive" timeout="30">

    <cfindex collection="shopColl"
             action="refresh" 
             type="custom"
             query="shop.getContent"
             key="id"
             title="title"
             body="title,description" >

    </cflock>

    <!--- Log information about document change --->
    <cflog file="updateStatus" application="No" 
      type="information" 
      text="MESSAGE: Eso shop collection updated; TIME: #now()#">


    <cfreturn true />

<cfcatch type="any">
    <!--- Log information about error --->
    <cflog file="updateStatus" application="No" 
      type="error" 
      text="MESSAGE: error in updating index -- #cfcatch.message#; DETAIL:#cfcatch.detail# TIME: #now()#">
    <cfreturn false />
</cfcatch>
</cftry>
</cfprocessingdirective>
+1  A: 

Try running it outside of being a task to see how long it takes. If it takes longer than 5 minutes, it could be deadlocking with the scheduled task.

jarofclay
Hi, jarofclay. I tried to run CFM with browser directly but ColdFusion still log the same error. Could you give me more any suggestion?
Teerasej
-Turn off the scheduled task so it doesn't run while you are testing-Restart the Verity service-Try running your script again (not as scheduled) and note the timeIf that is still giving you the same error, try running a repair with the executable in the k2\_nti40\bin directory:"mkvdk.exe -collection <collectionpath> -repair"
jarofclay