MongoDB API - $elementMatch in projections fails in DocumentDb but works on mongo


hi all

the $elementmatch operator in projections not being compatible mongodb api.

the following query runs fin in mongodb (can test in empty collection)

db.collection.find( { "operationresult.messages" : { $elemmatch : { $regex : /somereges/} }  }                      ,{ "relations.entityid" : {  $elemmatch : { "entitytype" : "personid" }  }  } )

but when attempting run in documentdb mongodb api following error:

"query failed error code 9 , error message 'syntax error, incorrect syntax near '38'.' on server .... "

thanks!





Microsoft Azure  >  Azure Cosmos DB



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'