Created
December 7, 2012 17:49
-
-
Save jeffcoughlin/4235035 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- instantiate cfsolrlib ---> | |
<cfset application.fapi.getContentType("configSolrServer").setupSolrLibrary() /> | |
<cfset tickBegin = getTickCount() /> | |
<cfset oSolrProContentType = application.fapi.getContentType("solrProContentType") /> | |
<cfset stContentType.contentType = "TYPENAME" /> | |
<cfset batchSize = 2000 /> | |
<cflog application="true" file="aaa_farcrySolrPro" type="information" text="A_1. procTime: #getTickCount()-tickBegin# Date: #dateFormat(now(),"yyyy-mm-dd")# #timeFormat(now(),"hh:mm:ss")#" /> | |
<cfset stResult = oSolrProContentType.getRecordsToIndex(typename = stContentType.contentType, batchSize = batchSize, builtToDate = "", bGetAllIds = false) /> | |
<cfset lItemsInDB = replace(stResult.lItemsInDb, ",", " OR ", "all") /> | |
<cflog application="true" file="aaa_farcrySolrPro" type="information" text="B_1. procTime: #getTickCount()-tickBegin# Date: #dateFormat(now(),"yyyy-mm-dd")# #timeFormat(now(),"hh:mm:ss")#" /> | |
<cfset stRecords = oSolrProContentType.search(q = "typename:" & stContentType.contentType & " AND fcsp_sitename:" & application.applicationName & " AND -objectid:(" & lItemsInDB & ")", rows = 99999999, params = {"fl" = "objectid"}) /> | |
<cflog application="true" file="aaa_farcrySolrPro" type="information" text="C_1. procTime: #getTickCount()-tickBegin# Date: #dateFormat(now(),"yyyy-mm-dd")# #timeFormat(now(),"hh:mm:ss")#" /> | |
<cfoutput> | |
<strong>Count:</strong> #arrayLen(stRecords.results)#<br /> | |
<strong>process took:</strong> #getTickCount()-tickBegin# ms | |
</cfoutput> | |
<cfabort /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment