Created
March 9, 2015 16:36
-
-
Save mokus80/a2d68241997778af09b4 to your computer and use it in GitHub Desktop.
This file contains 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
page = @options["page"] || 0 | |
per = @options["per"] || 10 | |
lat = @options["lat"] | |
lng = @options["lng"] | |
epid = @options["leadpipe_account_id"] | |
radius = @options["radius"].to_i * 1000 # convert km to m | |
results = IndexManager.search_index.search("", { | |
attributesToRetrieve: ["leadpipe_account_id"], | |
aroundLatLng: "#{lat},#{lng}", | |
aroundRadius: radius, | |
tagFilters: ["epid:#{epid}", "lead_assignment_subscription:true"], | |
hitsPerPage: per, | |
page: page }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment