[DOCS-5386] Comment on: "manual/reference/operator/aggregation/skip.txt" Created: 07/May/15  Updated: 03/Nov/17  Resolved: 07/May/15

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: Kay Kim (Inactive)
Resolution: Won't Fix Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

nodejs async package

Location: http://docs.mongodb.org/manual/reference/operator/aggregation/skip/
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36
Referrer: https://www.google.co.in/
Screen Resolution: 1152 x 864
repo: docs
source: reference/operator/aggregation/skip


Participants:
Days since reply: 8 years, 41 weeks ago

 Description   

1.)i want to find one query and skip some documents for that query and perform again another query(different from first query)



 Comments   
Comment by Kay Kim (Inactive) [ 07/May/15 ]

Hi – Thank you for filing the ticket; however, I believe this question is more appropriate for either StackOverflow(http://stackoverflow.com/questions/tagged/mongodb ) or mongodb-user google group (https://groups.google.com/forum/#!forum/mongodb-user).

Regarding your question, when using db.collection.aggregate( [ pipeline ] ), you can specify the $match stage multiple times in the pipeline.

db.foo.aggregate( [ { $match: { x: 1 } }, { $skip: 1 }, { $match: { y: { $gt: 2 } } }] )

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