couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Costakes <>
Subject Spacial search with GeoCouch
Date Fri, 17 May 2013 12:12:40 GMT
Using CouchDB (and GeoCouch), I have a document type of Location with a
center coordinate (lat & long).  I am able to query with a bbox query just
fine by feeding in a northwest longitude/latitude and a southwest
longitude/latitued. My location doc also has an attribute called Users
where I have an array of user id's. I would like to be able to perform a
bbox with the addition of filtering by a specific user in the Users array.
Is this possible?

The reason important is because I may have millions of different location
documents, each with a list of users in the User array (maybe hundreds of
user tags per location). I'm trying to find a list of locations for a group
of users. So I have 3 users for a particular search and I want to find all
of the locations for these users within a given boundry. The only way I can
think to handle this scenario is to perform the bbox spatial query first
and then loop through the result set to determine if the user matches the
list of the 3 users. This would mean looping through a potentially very
large original result set (the list of locations). Would love to add an
additional dimension to my bbox query to filter also by user, but I can't
figure out how to accomplish this or whether it is possible. Thank you!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message