Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
$elemMatch not working with $near <Jira SERVER-7581 created>
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Raxit Sheth  
View profile  
 More options Nov 7 2012, 12:40 pm
From: Raxit Sheth <raxitsheth2...@gmail.com>
Date: Wed, 7 Nov 2012 23:09:41 +0530
Local: Wed, Nov 7 2012 12:39 pm
Subject: [Geo] $elemMatch not working with $near <Jira SERVER-7581 created>

Hi

As per mongo doc on geo,  [
http://www.mongodb.org/display/DOCS/Geospatial+Indexing] ->Multi-location
documents >

db.places.insert({ addresses : [ { name : "Home", loc : [55.5, 42.3] }, {
name : "Work", loc : [32.3, 44.2] } ] })

how to find, all records near to address.loc [ 55.5,42.3] and those are
tagged as "home" (in same array element)

> db.places.find({"address" : {$elemMatch:{"loc":{$near:[55.5,42.3]},name:"Home"}}})

error: {
        "$err" : "can't find special index: 2d for: { address: { $elemMatch:
{ loc: { $near: [55.5,42.3] }, name: \"Home\" } } }",
        "code" : 13038

}

created jira issue here : https://jira.mongodb.org/browse/SERVER-7581

I think Geo is very very restrictive in Mongo, and great if someone
can quickly plan fix for it!

Raxit


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Raxit Sheth  
View profile  
 More options Nov 7 2012, 12:44 pm
From: Raxit Sheth <raxitsheth2...@gmail.com>
Date: Wed, 7 Nov 2012 23:13:54 +0530
Local: Wed, Nov 7 2012 12:43 pm
Subject: Re: [Geo] $elemMatch not working with $near <Jira SERVER-7581 created>

Interestingly

1.  $and with $near is also not working
2.  one can't create 2d/geo index on multiple field

So kind of got stuck !

Raxit

On Wed, Nov 7, 2012 at 11:09 PM, Raxit Sheth <raxitsheth2...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »