MongoDB Feature usage

Follow

This article describes the MongoDB features used in Countly, so it can be compared with alternative DB providers to assess their support.

MongoDB Features

Feature Scope Mandatory Version Comments
Bulk Operations (ordered and unordered) Core Yes All  
Capped Collections Request Logs, Push No 15.03 Must disable plugin(s) to work without the feature
Change Streams Core No Planned for the future  
GridFS Core No 17.05 Without it, the app icon, user image, and symbolication upload will not work on Countly multi server setup
Tailable Cursor Core, Push Yes 19.02  

 

Database Methods

(http://mongodb.github.io/node-mongodb-native/3.6/api/Db.html)

Feature Scope Mandatory Version Comments
buildInfo Core Yes All  
collection Core Yes All  
command Core Yes All  
convertToCapped Upgrade scripts No 15.03  
currentOp
Core Yes Planned for the future  
killOp
Core Yes Planned for the future  
listCollections
DBViewer, Upgrade sctips Yes 15.03  
renameCollection
Upgrade scripts No All Will result in longer, more complex upgrades
stats DB Viewer No Planned for the future  

 

Collection Methods

(http://mongodb.github.io/node-mongodb-native/3.6/api/Collection.html)

Feature Scope Mandatory Version
aggregate Core Yes All
bulkWrite Core Yes All
count Core Yes All
createIndexes
Core Yes All
deleteMany Core Yes All
deleteOne Core Yes All
drop
Core Yes All
dropIndexes
Upgrade scripts Yes All
estimatedDocumentCount Core Yes All
find Core Yes All
findOne Core Yes All
findAndModify
Core Yes All
findAndRemove Core Yes All
findOneAndDelete Core Yes All
findOneAndReplace Core Yes All
findOneAndUpdate Core Yes All
insertOne Core Yes All
insertMany Core Yes All
replaceOne Core Yes All
stream Core Yes All
watch Core Yes All

 

Cursor Methods

(http://mongodb.github.io/node-mongodb-native/3.6/api/Cursor.html)

Feature Scope Mandatory Version
batchSize Core Yes All
close Core Yes All
count Core Yes All
forEach Core Yes All
hasNext Core Yes All
limit Core Yes All
next Core Yes All
project Core Yes All
skip Core Yes All
sort Core Yes All
stream Core Yes All
toArray Core Yes All

 

Index types

(https://docs.mongodb.com/manual/indexes/#index-types)

Feature Scope Mandatory Version Comments
Background Core Yes All  
Compound Indexes Core Yes All  
Hash Index Sharding No All Needed if database is sharded
Multikey Indexes Core Yes All  
Unique Core Yes All  
Text Indexes User Profiles No 15.03 Without it, searching user profiles by name/email will not work
TTL Drill No All Used for data expiration

 

Operators

Query operators

(https://docs.mongodb.com/manual/reference/operator/query/)

Feature Scope Mandatory Version Comments/Commands
All Comparison Operators Core Yes All $eq, $gt, $gte, $in, $lt, $lte, $ne, $nin

All Logical Operators

Core Yes All $and, $not, $nor, $or

Array Query Operators

Core Yes All $all, $elemMatch, $size

Projection Operators

Core Yes All $, $elemMatch, $slice

$exists

Core Yes All  

$regex

Core Yes All  

$text

User Profiles No 15.03 Without it, searching user profiles by name/email will not work

$comment

Core Yes Planned for the future  

Bitwise Operators

Push Yes ~18
$bit, $bitsAllSet, $bitsAllClear

 

Update operators

(https://docs.mongodb.com/manual/reference/operator/update/)

Feature Scope Mandatory Version Commands
Field Operators Core Yes All $inc, $min ,$max, $mul, $set, $setOnInsert, $unset
Array Operators Core Yes All $, $[], $[<identifier>], $addToSet, $pop, $pull, $push, $pullAll
Array Operator Modifiers Core Yes All $each, $position, $slice

 

Aggregation pipeline stage operators

(https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/)

Feature Scope Mandatory Version Comments
$addFields Core Yes 20.04  
$count Core Yes All  
$facet Core Yes 20.04  
$group Core Yes All  
$limit Core Yes All  
$lookup Push, Views Yes 20.04 Must disable plugin(s) to work without the operator
$match Core Yes All  
$project Core Yes All  
$replaceRoot Retention Yes 20.04 Needs it for segmentation queries and event retention
$sample Flows Yes 20.04 Must disable plugin(s) to work without the operator
$skip Core Yes All  
$sort Core Yes All  
$unionWith Cohorts Yes 20.11.2  
$unwind Core Yes All  

 

Aggregation pipeline operators

(https://docs.mongodb.com/manual/reference/operator/aggregation/)

Feature Scope Mandatory Version Commands
Arithmetic Expression Operators Drill, Dataviews Yes 20.04 $add, $subtract, $multiply, $divide
Array Expression Operators Dataviews No Planned for the upcoming major release this year $arrayElemAt, $arrayToObject, $concatArrays, $filter, $first, $in, $indexOfArray, $isArray, $map, $objectToArray, $range, $reduce, $size, $slice, $zip
Boolean Expression Operators Core Yes All $and, $or, $not
Comparison Expression Operators Core Yes All $cmp, $eq, $gt, $gte, $lt, $lte, $ne
Conditional Expression Operators Core Yes 20.04 $cond, $ifNull, $switch
Object Expression Operators Performance monitoring, Views, Drill Yes 20.04 $mergeObjects, $objectToArray
Set Expression Operators Cohorts (before 20.11), Dataviews No Planned for the upcoming major release this year $setDifference, $setEquals, $setIntersection, $setIsSubset, $setUnion
String Expression Operators Core Yes 19.02 $concat, $split
Accumulators ($group) Core Yes All $addToSet, $avg, $first, $max, $mergeObjects, $min, $push, $sum
Variable Expression Operators Dataviews No Planned for the future $let
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.