Skip to main content
June 27, 2007
Question

cfsearch error: status code -1706

  • June 27, 2007
  • 5 replies
  • 2788 views
CF7.0.2 update level hf702-65114.jar (Standalone server on Windows 2003)

Type: SearchEngine
Message: There was a problem executing the CFSearch tag with the following collections.
Detail: Collection (status code): MyCollectionName (-1706)

Since re-creating a set of about 12 collections in a different folder (same drive), I've been getting the above error the first time CFSEARCH is invoked following an update of *any* collection (not necessarily the one mentioned in the error. Re-indexing or re-creating the named collection does *not* fix the problem: CFSEARCH will continue to fail - so it's not corruption. Re-starting the CF Search Service however does fix it... until the next time one or more collections are updated.

I am now auto-restarting the CF Search Service using cfexecute after each update but this is not ideal, and in fact just now it seems to have had no effect: the tag has errored again apparently in spite of the restart after the update.

I've searched for Verity status code 1706 but can find nothing. Can anyone shed any light?
    This topic has been closed for replies.

    5 replies

    Participant
    June 22, 2010

    I had very unstable search collections on my sites (Ent 8.0.1 with co-located collections), literaly every 5 mins a collection would go missing and this error would be thrown up. Cleaned out the workspace dir and all seems good for now. Keep you posted if this changes.

    August 22, 2007
    Just for the record, the problem appears to have gone away after upgrading to CF8.
    August 26, 2007
    Might have spoken too soon. Looks like we've had 2 incidents since the CF8 upgrade. Guess the exception handling code will have to stay in place.
    October 26, 2007
    This is definitely still happening in CF8.
    Inspiring
    July 6, 2007
    Wow - thanks so much!!!

    game_on
    Inspiring
    July 6, 2007
    Hi Julio. I've been getting the errors sent to by modile to keep on top of it. Not very relaxing. I hope that it will be sorted in cf8.

    Is the script for restarting the search service something that you would be prepared to share?

    game_on
    July 6, 2007
    Sure:

    1) Create a batch file (using Notepad but save file as "restartCFsearch.bat") to restart the Windows service and make sure the CF service account has execute permissions for it (if it's running as local system then it will have)

    NET STOP "ColdFusion MX 7 Search Server"
    NET START "ColdFusion MX 7 Search Server"

    2) Optionally create a function which executes the batch file (or you could just put the cfexecute directly in the exception handler, but creating a function will make it more re-usable):

    <cffunction name="restartCFSearchService" returntype="void" access="public" output="false">
    <cfexecute name="[path to your batch file, eg: D:\batch\restartCFsearch.bat]" timeout="30"></cfexecute>
    </cffunction>

    3) Wrap your cfsearch tag/function in a try/catch and test for the error:

    <cftry>
    <cfsearch... >
    <cfcatch type="SearchEngine">
    <cfif findNoCase("There was a problem executing the CFSearch tag",cfcatch.message)>
    <cfset restartCFSearchService()>
    <cfset sleep(3000)><!--- wait 3 seconds for the service to come back up --->
    <cfsearch...><!--- re-issue search --->
    <cfelse>
    <cfrethrow>
    </cfif>
    </cfcatch>
    </cftry>

    To pause before re-issuing the search I'm using http://www.cflib.org/udf.cfm/sleep

    Hope that helps.
    Inspiring
    July 6, 2007
    Hi Julio. I'm having the same problem. Did you ever find a solution?
    July 6, 2007
    Hi game_on

    Still no idea what the cause is. The CFSearch Service auto-restart immediately after the update usually prevents the problem, but not always. So to work around that I have added an exception handler which restarts the service, waits a couple of seconds for the service to be ready and then re-runs the search. Means somebody gets a slow search every now and then but at least I don't have to keep monitoring it.

    Would prefer to know what the cause is. Hopfully upgrading to CF8 will sort it out.