Chris Costakes
unread,May 17, 2013, 8:12:40 AM5/17/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to us...@couchdb.apache.org
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!