Giter VIP home page Giter VIP logo

Comments (8)

yngveaasheim avatar yngveaasheim commented on April 28, 2024 1

For the latter you can check out the distanceToPath() ranking feature as documented here:
http://docs.vespa.ai/documentation/geo-search.html
http://docs.vespa.ai/documentation/reference/rank-features.html

from vespa.

jobergum avatar jobergum commented on April 28, 2024

Thanks @knownasilya for this detailed feature request!

from vespa.

bratseth avatar bratseth commented on April 28, 2024

Are there any real use cases where this is more than a convenience?
You can always do a query with a radius and do a more fine filtering in code.

Applications with some complexity will add their own component in the stateless layer anyway. In general we're not really attempting to create declarative code for solving every use case, only the ones where computation close to data matters for performance.

from vespa.

knownasilya avatar knownasilya commented on April 28, 2024

only the ones where computation close to data matters for performance.

Use cases like find all fire departments in my county. Where the county isn't specified on the fire department data, but the fire department has a location. So you'd need to do a polygon query to see which fire departments intersect the county polygon.

Another example, I'm currently located at lat, long what property am I at? This requires doing an within query on the property polygon data with passed in latlong data.

I have a road, and I need to know which properties are along that road. Do a buffer on the road, and do an intersection of that buffer with all of the properties.

from vespa.

knownasilya avatar knownasilya commented on April 28, 2024

Thanks, forgot that was thee. Unfortunately, that would only work with documents that have points, not polygon data (or other spatial data types), is that correct?

from vespa.

bratseth avatar bratseth commented on April 28, 2024

Yes, that is correct, Vespa do not provide any feature where a document can have a polygon, but that is not needed for your "on the road" use case, which is the one we know of where radius+post-filtering wouldn't be efficient.

Regarding

Use cases like find all fire departments in my county.

You could do retrieve all documents within a circle encompassing the county, and filter those that are outside. That is probably more efficient, and certainly more flexible.

By the way, in practice this kind of thing is often solved using place names instead of koordinates.

from vespa.

knownasilya avatar knownasilya commented on April 28, 2024

You could do retrieve all documents within a circle encompassing the county, and filter those that are outside. That is probably more efficient, and certainly more flexible.

But less accurate, and that is important for any federal, state and local government scenarios.

Regarding the "on the road" example, the same thing applies. For example, one property might be bigger then the rest, and if you use a point (centroid), it would be missed because the point is further from the road then other properties. If you increase the road "width" then you run into finding properties that aren't even on the road. This trades accuracy for speed.

from vespa.

bratseth avatar bratseth commented on April 28, 2024

But less accurate, and that is important for any federal, state and local government scenarios.

With post filtering - in a component running inside the system - it is precisely as accurate.

The road feature should be implemented with the distance to path feature instead of radius. I agree that in that case radius+post filtering is not efficient, which is why we do provide a separate feature for it.

from vespa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.