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
component extends="config.WireBox" { | |
function configure(){ | |
super.configure(); | |
map("search.SearchService").to("models.SearchServiceCustom").asSingleton(); | |
} | |
} |
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
/* | |
** SearchService.cfc | |
*/ | |
component { | |
public string function getSearchResults(string query) { | |
return "I just searched for #arguments.query#"; | |
} | |
} |
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
package uk.ebiz.lucee.controller; | |
import io.milton.annotations.*; | |
import io.milton.http.http11.auth.DigestGenerator; | |
import io.milton.http.http11.auth.DigestResponse; | |
import io.milton.resource.AccessControlledResource; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import uk.ebiz.lucee.communicator.LuceeCommunicator; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<cfcomponent output="false" > | |
<cffunction name="init" access="public" returntype="any" > | |
<!--- this just sets up the CFC with the elasticSearch URL and port ---> | |
<cfargument name="searchEndPoint" type="string" required="true"/> | |
<cfargument name="searchPort" type="string" required="true"/> | |
<cfset variables.searchEndPoint = arguments.searchEndPoint /> | |
<cfset variables.searchPort = arguments.searchPort /> | |
<cfreturn this /> | |
</cffunction> |
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
<cfquery name="geteverything" datasource="bmf" result="info"> | |
SELECT | |
organisation.*, | |
address.* | |
<cfif radius neq "" AND lat neq "" AND lng neq ""> <!--- they are searching by location ---> | |
, | |
( | |
3959 * acos( | |
cos( | |
radians('#lat#') <!--- passed in latitude from client side script ---> |