get_intersecting
ReQL command: get_intersecting
Command syntax
table.get_intersecting(geometry, {:index => 'indexname'}) → selection<stream>
Description
Get all documents where the given geometry object intersects the geometry object of the requested geospatial index.
The index
argument is mandatory. This command returns the same results as table.filter{ |row| row['index'].intersects(geometry) }
. The total number of results is limited to the array size limit which defaults to 100,000, but can be changed with the array_limit
option to run.
Example: Which of the locations in a list of parks intersect circle1
?
circle1 = r.circle([-117.220406,32.719464], 10, {:unit => 'mi'}) r.table('parks').get_intersecting(circle1, {:index => 'area'}).run(conn)
Related commands
Get more help
Couldn't find what you were looking for?
- Ask a question on Stack Overflow
- Chat with us and our community on Slack
- Talk to the team on IRC on #rethinkdb@freenode.net — via Webchat
- Ping @rethinkdb on Twitter
- Post an issue on the documentation issue tracker on GitHub
© RethinkDB contributors
Licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
https://rethinkdb.com/api/ruby/get_intersecting/