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