MongoDB Reader node won't accept regex

Greetings, it looks like MongoDB Reader query won’t take regex.
Examples: these two forms of queries work under Mongo shell:

{ ‘buyer’ : {$regex: /ACME/}}
{ ‘buyer’ : /ACME/}

I also tried the syntax that works in Compass:

{‘buyer’: RegExp(‘ACME’)}

But neither forms work with MongoDB Reader Query. They all produce a syntax error. What would the correct syntax be?

Thanks!

Hi @jbuusao,
currently the MongoDB node does not support this, because it uses Jongo and there a regex cannot be defined inline in a query.
Kind regards,
Alexander

Thanks Alexander for a swift reply. If so I’ll avoid the regex by creating (from Mongo) appropriate additional attributes in MongoDB, that the MongoDB Reader node would query as exact match. Another approach could be to filter out in KNIME itself (say by using the Json Path node) but this could severely hinder performances.

Best,
JP