[DOCS-7948] Comment on: "manual/reference/operator/aggregation/filter.txt" Created: 24/May/16  Updated: 03/Nov/17  Resolved: 31/May/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Ravind Kumar (Inactive)
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mongodb v 3.2.6
ubuntu 14.04

Location: https://docs.mongodb.com/manual/reference/operator/aggregation/filter/#exp._S_filter
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36
Referrer: https://docs.mongodb.com/manual/reference/operator/projection/positional/
Screen Resolution: 1366 x 768


Participants:
Days since reply: 7 years, 37 weeks, 1 day ago

 Description   

i have created the same collection sales, as shown in the example and executed the filter projection query.
the query throws an error asserting invalid operator $filter.

assert: command failed:

{ "errmsg" : "exception: invalid operator '$filter'", "code" : 15999, "ok" : 0 }

: aggregate failed
_getErrorWithCode@src/mongo/shell/utils.js:25:13
doassert@src/mongo/shell/assert.js:13:14
assert.commandWorked@src/mongo/shell/assert.js:267:5
DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1312:5
@(shell):1:1

2016-05-24T11:24:01.257+0530 E QUERY [thread1] Error: command failed:

{ "errmsg" : "exception: invalid operator '$filter'", "code" : 15999, "ok" : 0 }

: aggregate failed :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
doassert@src/mongo/shell/assert.js:13:14
assert.commandWorked@src/mongo/shell/assert.js:267:5
DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1312:5
@(shell):1:1



 Comments   
Comment by Ravind Kumar (Inactive) [ 31/May/16 ]

User e-mailed 05/24. Closing ticket due to no response from user.

Comment by Ravind Kumar (Inactive) [ 24/May/16 ]

Hello,

Can you confirm what version of mongodb you are running? You can simply type db.version() into the mongo shell.

Can you also provide the exact query you used that generated this error? I have tested our example code in MongoDB 3.2.4 and was able to get the expected results. $filter is only available in MongoDB 3.2+

Generated at Thu Feb 08 07:55:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.