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
invalid operator: $elemMatch
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
 
threecuptea  
View profile  
 More options Aug 31 2012, 11:05 pm
From: threecuptea <threecup...@gmail.com>
Date: Fri, 31 Aug 2012 20:05:37 -0700 (PDT)
Local: Fri, Aug 31 2012 11:05 pm
Subject: invalid operator: $elemMatch

I am learning MongoDB and found that I got "invalid operator: $elemMatch"
whenever I use $elemMatch in the query no matter I follow the example in
"Seven Database in Seven Weeks" or following MongoDB Advanced Query
tutorial.  The followings are excerpt.

> db.documents.insert( {

... Name: "name1",
... Identifiers: [
... { name: "manufacturer26", value: "abc123" },
... { name: "store5", value: "tty3" },
... { name: "factory3", value: "521" }
... ]
... } );
> db.documents.find( { "Identifiers": {$elemMatch: { name: "store5", value:

"tty3" } } } );
error: { "$err" : "invalid operator: $elemMatch" }

I have the most recent version (2.2.0) of MongoDB.  Did I miss something?  
How do I get it to work?
Thanks.


 
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.
Rob Moore  
View profile  
 More options Sep 1 2012, 1:52 pm
From: Rob Moore <robert.allanb...@gmail.com>
Date: Sat, 1 Sep 2012 10:52:59 -0700 (PDT)
Local: Sat, Sep 1 2012 1:52 pm
Subject: Re: invalid operator: $elemMatch

I just tried it and it worked with 2.2.0 copying directly from above into
the console.  

Are you sure the version of the server you are running is 2.2.0?  I only
ask because the error I get back for a bad operator includes a error
'code'.  Can you try the following to verify?

> db.serverStatus().version
2.2.0
> version()

version: 2.2.0

Rob.


 
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 »