Feature Support
This section provides details on supported client and server features of the Oracle API for MongoDB.
Client Tools and Drivers
The Oracle API for MongoDB requires a MongoDB client that supports load balanced connections. The following list provides minimal versions for some client drivers and tools:
- C 1.19.0
- C# 2.13.0
- Compass 1.28.1
- Database Tools 100.5.0 (includes
mongoexport, mongorestore, and mongodump)
- Go 1.6.0
- Java 4.3.0
- MongoSH 0.15.6
- Node.js driver 4.1.0
- PyMongo 3.12.0 (for Python language)
- Ruby 2.16.0
- Rust 2.1.0
You can download these drivers from https://www.mongodb.com/docs/drivers/.
Preview Features
Some Oracle API for MongoDB functionality is available as preview features.
Preview features are provided so that you can evaluate new functionality before it becomes generally available. Preview features are fully supported from a security perspective and are suitable for evaluation and testing. However, because the feature is still under development, Oracle reserves the right to modify or remove the functionality, behavior, syntax, or semantics in a future release without preserving backward compatibility.
Preview features are disabled by default.
You can enable preview features in one of the following ways:
- Database-wide by setting the
mongo.preview property.
- For individual MongoDB statements by explicitly requesting preview functionality.
Enabling Preview Features Database-Wide
Enable preview features for your database for all Oracle API for MongoDB sessions by setting the mongo.preview property. This is a non-schema scoped property.
BEGIN
ords_admin.set_property(
p_key => 'mongo.preview',
p_value => 'true');
END;
/
commit;
The property value is case sensitive, so you have to specify ‘true’ in lowercase. You also need to commit this change explicitly.
After this property is enabled, all newly established Oracle API for MongoDB connections use preview functionality.
To check the proper setting of this property, you can query the ORDS properties as follows:
SELECT key, value FROM user_ords_properties WHERE key = 'mongo.preview';
Note:
- ORDS caches configuration properties. After changing the
mongo.preview property, it can take several minutes before the new setting becomes effective. (Engineering note: replace with the documented cache refresh interval.)
- Existing MongoDB client connections continue using the previous configuration. Disconnect and reconnect your MongoDB client after enabling or disabling preview mode.
Enabling Preview Features for Individual Statements
You can also enable preview features for individual MongoDB statements. Depending on the API, preview functionality can be requested by an individual command or within an aggregation pipeline. This allows you to evaluate preview functionality without enabling it for the entire database.
The following example creates a vector search index by enabling preview for the createSearchIndex command:
db.movies.createSearchIndex(
"vector_idx",
{
fields: [
{
type: "vector",
path: "embedding",
numDimensions: 768,
similarity: "cosine"
}
]
},
{
preview: true
}
)
The following example enables preview for the $vectorSearch aggregation pipeline stage by specifying the $preview hint:
db.MOVIES.aggregate([
{
$vectorSearch: {
index: "summary_vec_idx",
path: "summary_embedding",
queryVector: /* vector here */,
limit: 5,
exact: false,
hint: { "$preview": 1 }
}
}
]);
Only the command or aggregation pipeline operator that explicitly requests preview functionality executes in preview mode. Other commands and operators continue to use the default behavior unless preview is explicitly requested.
Preview features are explicitly marked in the subsequent sections.
Database Commands
This section lists MongoDB commands that are supported by the Oracle API for MongoDB.
| Command |
Support (Since) |
Notes |
cloneCollectionAsCapped |
No |
|
collMod |
26ai |
Supported property: validator. |
convertToCapped |
No |
|
create |
19c |
|
createView |
26ai |
|
createIndexes |
26ai. No-op (19c) |
|
createSearchIndexes |
26ai |
Preview |
currentOp |
No |
|
drop |
19c |
|
dropDatabase |
19c |
Deletes all collections in the current Oracle Database schema. Does not delete (drop) the schema itself. |
dropIndexes |
26ai. No-op (19c) |
|
dropSearchIndex |
26ai |
Preview |
filemd5 |
No |
This command is deprecated in MongoDB and its use is discouraged as MD5 is no longer considered cryptographically secure. |
getParameter |
19c |
Parameter supported: authenticationMechanisms |
killCursors |
19c |
Supported field: cursors. |
killOp |
No |
|
listCollections |
19c |
|
listDatabases |
19c |
|
listIndexes |
19c |
|
reIndex |
No-op |
Deprecated since MongoDB version 6.0. |
renameCollection |
26ai |
|
setParameter |
No-op |
|
validate |
19c |
|
repairDatabase |
No-op |
|
Aggregation Commands
| Command |
Support (Since) |
Notes |
aggregate |
26ai |
|
count |
19c |
|
distinct |
19c |
|
mapReduce |
No |
|
Authentication Commands
| Command |
Support (Since) |
Notes |
logout |
19c |
|
Diagnostic
| Command |
Support (Since) |
Notes |
buildInfo |
19c |
Returns information about current build of Oracle Database API for MongoDB. |
collStats |
19c |
|
compact |
No-op |
|
connPoolStats |
No |
|
connectionStatus |
19c |
|
dataSize |
19c |
|
dbHash |
No |
|
dbStats |
19c |
|
explain |
19c |
|
explain, executionStats |
19c |
|
features |
No |
|
getLog |
No-op |
|
hostInfo |
19c |
|
listCommands |
19c |
|
ping |
19c |
|
profiler |
No |
Use SQL Monitor for query profiling. |
serverStatus |
19c |
|
top |
No |
|
whatsmyuri |
19c |
|
Query and Write Operation
| Command |
Support (Since) |
Notes |
| Change Streams |
26ai |
Preview |
delete |
19c |
|
find |
19c |
|
findAndModify |
19c |
|
getLastError |
19c |
|
getMore |
19c |
|
getPrevError |
No |
|
GridFS |
19c |
|
insert |
19c |
|
parallelCollectionScan |
No |
|
resetError |
19c |
|
update |
19c |
|
Role Management Commands
| Command |
Support (Since) |
Notes |
createRole |
No |
|
dropRole |
No |
|
dropAllRolesFromDatabase |
No |
|
grantRolesToRole |
No |
|
revokePrivilegesFromRole |
No |
|
updateRole |
No |
|
rolesInfo |
No |
|
Replication Commands
| Command |
Support (Since) |
Notes |
hello |
19c |
|
isMaster |
19c |
|
replSetGetStatus |
No-op |
Ignored. Not applicable. |
Sessions Commands
| Command |
Support (Since) |
Notes |
abortTransaction |
19c |
|
commitTransaction |
19c |
|
endSessions |
19c |
|
killAllSessions |
19c |
|
killAllSessionsByPattern |
19c |
|
killSessions |
19c |
|
refreshSessions |
19c |
|
startSession |
19c |
|
User Management Commands
| Command |
Support (Since) |
Notes |
createUser |
No |
|
dropAllUsersFromDatabase |
No |
|
dropUser |
No |
|
grantRolesToUser |
No |
|
revokeRolesFromUser |
No |
|
updateUser |
No |
|
userInfo |
No |
|
Sharding Commands
| Command |
Support (Since) |
Notes |
abortReshardCollection |
No |
Not applicable. |
addShard |
No |
Not applicable. |
addShardZone |
No |
Not applicable. |
balancerCollectionStatus |
No |
Not applicable. |
balancerStart |
No |
Not applicable. |
balancerStatus |
No |
Not applicable. |
balancerStop |
No |
Not applicable. |
checkShardingIndex |
No |
Not applicable. |
clearJumboFlag |
No |
Not applicable. |
cleanupOrphaned |
No |
Not applicable. |
cleanupReshardCollection |
No |
Not applicable. |
commitReshardCollection |
No |
Not applicable. |
enableSharding |
No |
Not applicable. |
flushRouterConfig |
No |
Not applicable. |
getShardMap |
No |
Not applicable. |
getShardVersion |
No |
Not applicable. |
isdbGrid |
No |
Not applicable. |
listShards |
No |
Not applicable. |
medianKey |
No |
Not applicable. |
moveChunk |
No |
Not applicable. |
movePrimary |
No |
Not applicable. |
mergeChunks |
No |
Not applicable. |
refineCollectionShardKey |
No |
Not applicable. |
removeShard |
No |
Not applicable. |
removeShardFromZone |
No |
Not applicable. |
reshardCollection |
No |
Not applicable. |
setAllowMigrations |
No |
Not applicable. |
setShardVersion |
No |
Not applicable. |
shardCollection |
No |
Not applicable. |
shardingState |
No |
Not applicable. |
split |
No |
Not applicable. |
splitVector |
No |
Not applicable. |
unsetSharding |
No |
Not applicable. |
updateZoneKeyRange |
No |
Not applicable. |
Operators
Array Query Operators
| Operator |
Support (Since) |
Notes |
$all |
19c |
|
$elemMatch |
19c |
|
$size |
19c |
|
Bitwise Query Operators
| Operator |
Support (Since) |
Notes |
$bitsAllSet |
26ai |
|
$bitsAnySet |
26ai |
|
$bitsAllClear |
26ai |
|
$bitsAnyClear |
26ai |
|
Comparison Query Operators
| Operator |
Support (Since) |
Notes |
$eq |
19c |
|
$gt |
19c |
|
$gte |
19c |
|
$lt |
19c |
|
$lte |
19c |
|
$ne |
19c |
|
$in |
19c |
|
$nin |
19c |
|
Element Query Operators
| Operator |
Support (Since) |
Notes |
$exists |
19c |
|
$type |
19c |
|
Evaluation Query Operators
| Operator |
Support (Since) |
Notes |
$expr |
26ai |
|
$jsonSchema |
No |
|
$mod |
26ai |
|
$regex |
19c |
|
$text |
19c |
|
$where |
No |
Server-side JavaScript Deprecated, see MongoDB documentation. |
Geospatial Query Operators
| Operator |
Support (Since) |
Notes |
$box |
No |
|
$center |
No |
|
$centerSphere |
No |
|
$geoIntersects |
19c |
|
$geometry |
19c |
|
$geoWithin |
19c |
|
$maxDistance |
19c |
|
$minDistance |
19c |
|
$near |
19c |
|
$nearSphere |
19c |
|
$polygon |
No |
|
$uniqueDocs |
No |
|
Logical Query Operators
| Operator |
Support (Since) |
Notes |
$and |
19c |
|
$nor |
19c |
|
$not |
19c |
|
$or |
19c |
|
Projection Operators
| Operator |
Support (Since) |
Notes |
$elemMatch |
19c |
|
$meta |
No |
|
$slice |
No |
|
Array Update Operators
| Operator |
Support (Since) |
Notes |
$ |
19c |
|
$[] |
19c |
|
$[<identifier>] |
19c |
|
$addToSet |
19c |
|
$pop |
19c |
|
$pull |
19c |
|
$pullAll |
19c |
|
$push |
19c |
|
Bitwise Update Operator
| Operator |
Support (Since) |
Notes |
$bit |
19c |
|
Field Update Operators
| Operator |
Support (Since) |
Notes |
$currentDate |
19c |
|
$inc |
19c |
|
$max |
19c |
|
$min |
19c |
|
$mul |
19c |
|
$rename |
19c |
|
$set |
19c |
|
$setOnInsert |
19c |
|
$unset |
19c |
|
Modifier Update Operators
| Operator |
Support (Since) |
Notes |
$each |
19c |
|
$position |
19c |
|
$slice |
19c |
|
$sort |
19c |
|
Aggregation Pipeline Stages
| Stage |
Support (Since) |
Notes |
$addFields |
26ai |
Alias: $set. |
$bucket |
26ai |
|
$bucketAuto |
26ai |
|
$collStats |
19c |
|
$count |
19c |
|
$changeStream |
26ai |
Preview |
$currentOp |
No |
|
$documents |
26ai |
|
$external |
26ai |
See $external Aggregation Pipeline Stage. |
$facet |
26ai |
|
$geoNear |
No |
|
$graphLookup |
26ai |
|
$group |
26ai |
|
$indexStats |
26ai |
|
$listSearchIndexes |
26ai |
Preview |
$limit |
19c |
|
$listLocalSessions |
No |
|
$listSessions |
No |
|
$lookup |
26ai |
See section on $lookup below. |
$match |
19c |
|
$merge |
26ai |
|
$out |
26ai |
|
$planCacheStats |
No |
|
$project |
19c |
|
$redact |
No |
|
$replaceRoot |
26ai |
|
$replaceWith |
26ai |
|
$sample |
26ai |
|
$search |
26ai |
Preview |
$setWindowFields |
No |
|
$set |
26ai |
|
$skip |
19c |
|
$sort |
19c |
|
$sortByCount |
26ai |
|
$sql |
19c |
See $sql Aggregation Pipeline Stage. |
$unionWith |
26ai |
|
$unset |
19c |
|
$unwind |
26ai |
|
$vectorSearch |
26ai |
Preview |
$lookup Aggregation Pipeline Stage
Restrictions on the use of stage $lookup are described.
- Field
let is not supported. An error is raised if you use it.
- If the value of field
localField is a field that’s missing from any input documents then an error is raised. (The missing field is not treated as if it were present with the value of null.)
- If the value of field
localField is an array, or if it is a field that occurs more than once in an input document (thus producing multiple values), then an error is raised.
- If the value of field
foreignField is a field that’s missing from the input documents then no documents match (no error is raised). This includes the case where the document field specified by field localField is missing or has a null value.
Aggregation Pipeline Operators and Expressions
Arithmetic Operators
| Operator |
Support (Since) |
Notes |
$abs |
26ai |
|
$add |
26ai |
|
$ceil |
26ai |
|
$divide |
26ai |
|
$exp |
26ai |
|
$floor |
26ai |
|
$ln |
26ai |
|
$log |
26ai |
|
$log10 |
26ai |
|
$mod |
26ai |
|
$multiply |
26ai |
|
$pow |
26ai |
|
$round |
26ai |
|
$sqrt |
26ai |
|
$subtract |
26ai |
|
$trunc |
26ai |
|
Trigonometry Operators
| Operator |
Support (Since) |
Notes |
$sin |
26ai |
|
$cos |
26ai |
|
$cosh |
26ai |
|
$tan |
26ai |
|
$asin |
26ai |
|
$acos |
26ai |
|
$atan |
26ai |
|
$atan2 |
26ai |
|
$sinh |
26ai |
|
$tanh |
26ai |
|
$degreesToRadians |
26ai |
|
$radiansToDegrees |
26ai |
|
Array Operators
| Operator |
Support (Since) |
Notes |
$arrayElemAt |
26ai |
|
$arrayToObject |
26ai |
|
$concatArrays |
26ai |
|
$filter |
26ai |
|
$first |
26ai |
|
$firstN |
26ai |
|
$in |
26ai |
|
$indexOfArray |
26ai |
|
$isArray |
26ai |
|
$last |
26ai |
|
$lastN |
26ai |
|
$objectToArray |
26ai |
|
$range |
26ai |
|
$reduce |
26ai |
|
$reverseArray |
26ai |
|
$size |
26ai |
|
$slice |
26ai |
|
$sortArray |
26ai |
|
$zip |
26ai |
|
Boolean Operators
| Operator |
Support (Since) |
Notes |
$and |
26ai |
|
$not |
26ai |
|
$or |
26ai |
|
Comparison Operators
| Operator |
Support (Since) |
Notes |
$cmp |
26ai |
|
$eq |
26ai |
|
$gt |
26ai |
|
$gte |
26ai |
|
$lt |
26ai |
|
$lte |
26ai |
|
$ne |
26ai |
|
Conditional Operators
| Operator |
Support (Since) |
Notes |
$cond |
26ai |
|
$ifNull |
26ai |
|
$switch |
26ai |
|
Date Operators
| Operator |
Support (Since) |
Notes |
$dateAdd |
26ai |
|
$dateDiff |
26ai |
|
$dateFromParts |
No |
|
$dateFromString |
26ai |
|
$dateSubtract |
26ai |
|
$dateToParts |
26ai |
|
$dateToString |
26ai |
|
$dateTrunc |
26ai |
|
$dayOfMonth |
26ai |
|
$dayOfWeek |
26ai |
|
$dayOfYear |
26ai |
|
$hour |
26ai |
|
$isoDayOfWeek |
26ai |
|
$isoWeek |
26ai |
|
$isoWeekYear |
26ai |
|
$millisecond |
26ai |
|
$minute |
26ai |
|
$month |
26ai |
|
$second |
26ai |
|
$week |
26ai |
|
$year |
26ai |
|
Literal Operator
| Operator |
Support (Since) |
Notes |
$literal |
26ai |
|
Object Operators
| Operator |
Support (Since) |
Notes |
$mergeObjects |
26ai |
|
$objectToArray |
26ai |
|
$setField |
26ai |
|
$unsetField |
26ai |
|
Set Operators
| Operator |
Support (Since) |
Notes |
$allElementsTrue |
26ai |
|
$anyElementFalse |
No |
|
$anyElementTrue |
26ai |
|
$setDifference |
26ai |
|
$setEquals |
No |
|
$setIntersection |
26ai |
|
$setIsSubset |
No |
|
$setUnion |
26ai |
|
String Operators
| Operator |
Support (Since) |
Notes |
$concat |
26ai |
|
$indexOfBytes |
No |
|
$indexOfCP |
26ai |
|
$ltrim |
26ai |
|
$regexFind |
No |
|
$regexFindAll |
No |
|
$regexMatch |
26ai |
|
$replaceAll |
26ai |
|
$replaceOne |
26ai |
|
$rtrim |
26ai |
|
$split |
26ai |
|
$strcasecmp |
26ai |
|
$strLenBytes |
No |
|
$strLenCP |
No |
|
$substr |
No |
|
$substrBytes |
No |
|
$substrCP |
26ai |
|
$toLower |
26ai |
|
$toUpper |
26ai |
|
$trim |
19c |
|
Text Operators
| Operator |
Support (Since) |
Notes |
$meta |
No |
|
Type Operators
| Operator |
Support (Since) |
Notes |
$convert |
26ai |
|
$isNumber |
26ai |
|
$toBool |
26ai |
|
$toDate |
26ai |
|
$toDecimal |
26ai |
|
$toDouble |
26ai |
|
$toInt |
26ai |
|
$toLong |
26ai |
|
$toObjectId |
26ai |
|
$toString |
26ai |
|
$type |
26ai |
|
Accumulator Operators
| Operator |
Support (Since) |
Notes |
$accumulator |
No |
Server-side JavaScript Deprecated, see MongoDB documentation. |
$addToSet |
26ai |
|
$avg |
26ai |
|
$bottom |
26ai |
|
$bottomN |
26ai |
|
$count |
26ai |
|
$first |
26ai |
|
$firstN |
No |
|
$last |
26ai |
|
$lastN |
No |
|
$max |
26ai |
|
$maxN |
No |
|
$min |
26ai |
|
$push |
26ai |
|
$stdDevPop |
26ai |
|
$stdDevSamp |
26ai |
|
$sum |
26ai |
|
$top |
26ai |
|
$topN |
26ai |
|
Variable Operators
| Operator |
Support (Since) |
Notes |
$let |
26ai |
|
System Variables
| Variable |
Support (Since) |
Notes |
$$CURRENT |
26ai |
|
$$DESCEND |
No |
|
$$KEEP |
No |
|
$$PRUNE |
No |
|
$$REMOVE |
No |
|
$$ROOT |
26ai |
|
Miscellaneous Operators
| Operator |
Support (Since) |
Notes |
$binarySize |
26ai |
|
$bsonSize |
26ai |
|
$getField |
26ai |
|
$rand |
26ai |
|
$sampleRate |
No |
|
$map |
26ai |
|
$function |
No |
Server-side JavaScript Deprecated, see MongoDB documentation. |
Data Types
Support of MongoDB BSON data types:
| Data Type and Alias |
Support (Since) |
Notes |
32-Bit Integer (int) |
19c |
|
64-Bit Integer (long) |
19c |
|
Array (array) |
19c |
|
Binary Data (binData) |
19c |
|
Boolean (bool) |
19c |
|
Date (date) |
19c |
|
DBPointer (dbPointer) |
No |
|
Decimal128 (decimal) |
19c |
|
Double (double) |
19c |
|
JavaScript (javascript) |
No |
|
MaxKey (maxKey) |
No |
|
MinKey (minKey) |
No |
|
Null (null) |
19c |
|
Object (object) |
19c |
|
ObjectId (objectId) |
19c |
|
Regular Expression (regex) |
No |
|
String (string) |
19c |
|
Symbol (symbol) |
No |
|
Timestamp (timestamp) |
No |
|
Undefined (undefined) |
No |
|
Unsupported types are converted to strings on load.
Indexes
| Index Type |
Support (Since) |
Notes |
| 2d Index |
No |
|
| 2dsphere Index |
No |
You can create an Oracle AI Database spatial index using SQL CREATE INDEX on the backing table of the collection. |
| Compound Multikey Index |
26ai |
See Note, below. |
| Hashed Index |
No |
|
| Single Field Multikey Index |
26ai |
See Note, below. |
| Text Index |
19c |
|
Index options
| Index Option |
Support (Since) |
Notes |
| background |
No-op |
Deprecated by MongoDB. Ignored by Oracle AI Database. |
| collation |
No |
|
| expireAfterSeconds |
26ai |
|
| hidden |
No |
|
| online |
26ai |
Specific to Oracle AI Database. Value can be true (default) or false. True means DML operations on the table are allowed during index creation. |
| partialFilterExpression |
No |
See Partial Indexes with Oracle? Yes, without actually having them. |
| sparse |
26ai |
|
| storageEngine |
No |
|
| unique |
26ai |
|