anchor.diff:  			FROM results
   			</cfquery>
   		</cfif>
  +		<cfset console("#now()# ---------------------- SEARCH DONE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")>
   		<!--- Return --->
   		<cfreturn results>
   	</cffunction>
  
positive.code: 		 Preserve the '+' sign during decoding as the URLDecode methode will remove it if present.
  		 Do not use escape(deprecated) or encodeURI (doesn't encode '+' sign) methods to encode. Use the encodeURIComponent javascript method only.
  		--->
  		<cfset var criteria = replace(urlDecode(replace(arguments.criteria,"+","PLUSSIGN","ALL")),"PLUSSIGN","+","ALL")>
  		<!--- If criteria is empty --->
  		<cfif criteria EQ "" OR criteria EQ "*">
  			<cfset var criteria = "">
  		<!--- FOR DETAIL SEARCH WE LEAVE IT ALONE --->
  		<cfelseif arguments.search_type EQ "adv">
  			<cfset var criteria = criteria>
  		<!--- SIMPLE SEARCH --->
  		<!--- Put search together. If the criteria contains a ":" then we assume the user wants to search with his own fields --->
  		<cfelseif NOT criteria CONTAINS ":" AND NOT criteria EQ "*">
  			<cfset criteria = _escapelucenechars(criteria)>
  			<!--- Replace spaces with AND if query doesn't contain AND, OR  or " --->
  			<cfif find(" AND ", criteria) EQ 0 AND find(" OR ", criteria) EQ 0 AND find('"', criteria) EQ 0 >
  				<cfset var criteria_sp = replace(criteria,chr(32)," AND ", "ALL")>
  			<cfelse>	
  				<cfset var criteria_sp = criteria>
  			</cfif>
  			<cfif criteria CONTAINS '"' OR criteria CONTAINS "*" OR find(" AND ", criteria) NEQ 0 OR find(" OR ", criteria) NEQ 0>
  				<cfset var criteria = 'filename:("#criteria#") keywords:("#criteria_sp#") description:("#criteria_sp#") id:("#criteria_sp#") labels:("#criteria_sp#") customfieldvalue:("#criteria_sp#")'>
  			<cfelse>
  				<cfset var criteria = 'filename:(#criteria#*) keywords:(#criteria_sp#) description:(#criteria_sp#) id:(#criteria_sp#*) labels:(#criteria_sp#) customfieldvalue:(#criteria_sp#*) filename:("#criteria#") keywords:("#criteria_sp#") description:("#criteria_sp#") id:("#criteria_sp#") labels:("#criteria_sp#") customfieldvalue:("#criteria_sp#")'>
  			</cfif>
  			<cfset var criteria = '(' & criteria_sp  & ') ' & criteria />
  		</cfif>
  		<!--- Add rendition search to it --->
  		<cfif arguments.search_rendition EQ "t">
  			<cfif criteria EQ "" OR criteria EQ "*">
  				<cfset var criteria = 'file_type:original'>
  			<cfelse>
  				<cfset var criteria = '(' & criteria & ') AND file_type:original'>
  			</cfif>
  		<cfelse>
  			<cfif criteria EQ "" OR criteria EQ "*">
  
negative.code: 		<cfset lucenestr = replace(lucenestr,"||","\||","ALL")>	
  		<cfset lucenestr = replace(lucenestr,"(","\(","ALL")>
  		<cfset lucenestr = replace(lucenestr,")","\)","ALL")>		
  		<cfset lucenestr = replace(lucenestr,'"','','ALL')>		
  		<!--- Return --->
  		<cfreturn lucenestr>	
  	</cffunction>
  