Work with GeoLocation

Hi. I'm trying to implement the near me feature using geolocation type field. However i don't see any documentation regarding quering using geolocation, so if you can please help me or just point to the right documentation, that'll be great.

Hey @malik_aditya, near me can be implemented with a Geo Filter: https://swiftype.com/documentation/app-search/api/search/filters#geo-filters.

"filters": {
    "location": {
      "center": "37.386483, -122.083842",
      "distance": 300,
      "unit": "km"
    }
  }

Pass the user's location in as "center" and then adjust the "distance" and "unit" to whatever you would consider "near".

Yeah actually i found a similar question (How to implement proximity search in app search) so i deleted this post.

One thing I wanted to clear is Signed Search Keys can only be created by using the clients and not directly like via an API call?

Correct. You can use the clients or even write your own code to create the signed key in whatever language you prefer.

Clients are typically the easier approach, of course.

yes sir client are easier to approch.. so can do that .

mcdvoice

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.