Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geolocation / Geosearch #78

Closed
natew opened this issue Nov 28, 2019 · 18 comments
Closed

Geolocation / Geosearch #78

natew opened this issue Nov 28, 2019 · 18 comments

Comments

@natew
Copy link

natew commented Nov 28, 2019

Just curious about plans for support

@kishorenc
Copy link
Member

@natew Yes, that's on the todo list. What kind of features would you like apart from the ability to sort the results based on a given lat long (i.e. returning search results closest to a given geographical location).

@natew
Copy link
Author

natew commented Nov 30, 2019

Beyond that I don't know, yet.

@hutbert
Copy link

hutbert commented Dec 9, 2020

A great addition to this would be to have the ability to define a polygon and then search for items within a polygon. See https://dev.mysql.com/doc/refman/5.7/en/gis-class-polygon.html for this feature in MySQL. That might be a pretty big stretch though.

@jasonbosco
Copy link
Member

jasonbosco commented Dec 9, 2020

@hutbert Certainly on our radar :) If you'd like, happy to connect live so I can understand your use case and prioritize this feature. Would help ensure that we ship something with proven practical value. Let me know!

@hutbert
Copy link

hutbert commented Dec 9, 2020

@jasonbosco I don't have a specific use case so I wouldn't prioritize anything on my account. We have run into situations on some projects where our clients want to limit searches within particular boundaries (like within city limits) rather than by a radius around a fixed point. My primary use case would be sorting by distance for sure but thought this might be a good addition.

@0xflotus
Copy link
Contributor

Geo distance queries (with various units) would be a massive feature 🎉

GET /collections/:collection/documents/search?lat=50&lon=12&distance=12%20km HTTP/1.1

@Elliot-Pitts
Copy link

For a project I have coming up, I would love to use Typesense but the lack of geosearch is a hurdle. Just a simple distance query as @0xflotus suggested would be great to start with.

@rodrigoTrespalacios
Copy link

I was also looking to use a hosted version of Typesense for a new project, but the only thing blocking me is the lack of geosearch which is a main feature of my application. A distance based query would be enough for me too.

@daamsie
Copy link

daamsie commented Mar 1, 2021

Also evaluating Typesense and this is a feature I'd need to see to be able to make the switch.

Particular use case is searching for hotels within a certain geographic area, or near a point of interest. Searching within a bounding polygon is important for this scenario.

Another thing is to boost the ranking of results based on proximity to a location.

Specific use case is searching for points of interest. When a user types ie.. "Zoo", I would want the nearest zoo to be returned based on their geolocation.

I'll keep an eye on this issue to see how it progresses.

@cboothe
Copy link

cboothe commented Apr 23, 2021

Hi @jasonbosco I noticed there is a geosearch branch but it hasn't been touched since January.
Are you still working or planning this feature?

@jasonbosco
Copy link
Member

Hi @cboothe, geosearch is definitely still planned! In fact we got about 80% of the work done, but some other high priority requests and issues showed up, so we had to put this on pause, while we tackle those.

@kishorenc
Copy link
Member

I'm excited to announce a preview build for the geo search feature!

Please use this docker image: typesense/typesense:0.21.0.rc7

I've put together a quick guide here: https://gist.github.com/kishorenc/1f537c728f89960048272a03d36bad01

I look forward to hearing your feedback.

@daamsie
Copy link

daamsie commented May 17, 2021

Looks great! Very close to meeting my needs. Will the geo data be available as a ranking signal as well? Ie, I'd like to search for all results by keyword "park" , but have the ones nearest to me returned first.

@jasonbosco
Copy link
Member

jasonbosco commented May 17, 2021

@daamsie Yes! You can use the sort_by search parameter to rank based on proximity to a given lat/lng:

sort_by=location(48.853, 2.344):ASC

@jasonbosco jasonbosco changed the title Geolocation Geolocation / Geosearch May 18, 2021
@cboothe
Copy link

cboothe commented May 19, 2021

Works for me!

@kishorenc
Copy link
Member

Geosearch has shipped as part of v0.21.0. Thank you everyone for your kind feedback and comments.

@nandorojo
Copy link

Would it be possible to add IP-address-based geofencing, similar to aroundLatLngViaIP from Algolia?

@jasonbosco
Copy link
Member

@nandorojo We're tracking that request as part of #539

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants