MongoDB Interview Questions - 3 | Snaprecruit.com

MongoDB Interview Questions - 3 | Snaprecruit.com

MongoDB interview questions part 3

MongoDB interview questions part 3

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. ________ applies an expression to each item in an array and returns an array with the applied results.

Correct Answer is : $map

2. In the vars assignment block, ________ refers to the value of an externally defined variable low .

Correct Answer is : “$$low”

3. To avoid treating numeric or boolean literals as projection flags, use the _______ expression to wrap the numeric or boolean literals.

Correct Answer is : $literal

4. MongoDB treats the literals as projection flags, valid only in the _______ stage.

Correct Answer is : $project

5. Point out the wrong statement :

Correct Answer is : $project reshapes each document in the stream, such as by adding new fields or removing existing fields

6. ________ passes the first n documents unmodified to the pipeline where n is the specified limit

Correct Answer is : $limit

7. _______ reorders the document stream by a specified sort key

Correct Answer is : $sort

8. Which of the following operator incorporates the functionality of $match, $sort, and $limit for geospatial data?

Correct Answer is : $geoNear

9. _____ Writes the resulting documents of the aggregation pipeline to a collection.

Correct Answer is : $out

10. ________ deconstructs an array field from the input documents to output a document for each element.

Correct Answer is : $unwin

11. Aggregation pipeline was introduced in MongoDB version ______

Correct Answer is : 2.2

12. Point out the wrong statement :

Correct Answer is : All of the mentioned

13. ________ calculates aggregate values for the data in a collection.

Correct Answer is : db.collection.aggregate

14. Cursors returned from aggregation only supports cursor methods like :

Correct Answer is : cursor.hasNext()

15. Point out the wrong statement :

Correct Answer is : Pipeline stages do need to produce one output document for every input document

16. ______ can be used to iterate the cursor of document results returned by db.collection.find().

Correct Answer is : it

17. To handle large datasets, set _________ option to true to enable writing data to temporary files.

Correct Answer is : allowDiskUse

18. Syntax for specifying an initial batch size for the cursor is :

Correct Answer is : cursor: { batchSize: }

19. Query shape consists of a combination of query, sort, and _________ specifications.

Correct Answer is : collection

20. Which of the following method is overrided by Index filters ?

Correct Answer is : hint

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon