Spatial Search Objectify, appengine

180 views Asked by At

I want to use, objectify for spatial search. I have entities that have longitude and latitude associated with them. Latitude and longitude information is dynamic e.g. service providers (like electrician, carpenter) in a city. I want to implement a query that gives me service providers providing some specific service in 1 Km radius. Searching on google reveals following options

  1. Use Objectify with geohashes - Not sure, how accurate and scalable this solution is
  2. Use Google Search - It will need entities(or part of it) duplicated in the form of documents and Will it be able to support dynamically updated locations.
  3. Use other database like mongodb

Assuming few millions entities and latitude/longitude dynamically updated, please suggest me an appropriate option.

thanks Ittium

2

There are 2 answers

0
stickfigure On

I've used geohashes. It works, although you end up selecting more data than the exact bounds you are looking for and then filtering out the extra. This might or might not be a good solution depending on your specific application. It requires writing more code but has fewer moving parts (all in the datastore).

Google search and "other database" are basically the same architectural pattern - use the task queue to replicate updates to an external index. If you want a quick solution, the search service is probably is the easiest to wrap your head around.

Just pick one solution and run with it for a while. You can always reindex the data into a different solution.

3
jirungaray On

It really depends on your query rate but I usually prefer to use google search. Building and maintaining docs is pretty simple and you get a different quota to handle this queries.