Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

444
Vistas
$expr' operator not supported in AWS documentdb - Any alternative to $exp

We are trying to migrate Mongo 4.4 version to Document DB 3.6 - 4 version. While checking for compaitability we saw '$expr' operator not supported. Is there any alternative to this in AWS Documentdb?

Two sample statement :

RARELD.quoteLineItems.find({'$expr': {'$ne': ['$opportunityID', '$opportunityID']}}, {})  // ['$expr']
RARE2D.rareQuotes.aggregate([{'$match': {'lob': 'Medical', 'errors.errorList': {'$exists': True}, '$expr': {'$gte': [{'$size': '$errors.errorList'}, 3]}}}, {'$skip': 0}, {'$group': {'_id': 1, 'n': {'$sum': 1}}}])  // ['$expr']
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

There is no alternative to $expr as this is the only operator that allow's you to use aggregation operators within the query language, specifically when it comes to the simple queries (aka find).

When you're using an aggregation you can always find a workaround, it just might be less efficient.

Specifically with your aggregation example you can just write

'$expr': {'$gte': [{'$size': '$errors.errorList'}, 3]}}

as

"errors.errorList.2": {"$exists": True}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda