I am trying to query a collection with a like query, which we do in relational DB. I am trying to get a config which ends with LOYALTY_SERVICE_ENABLED
However, I couldn't use like query as I wanted. Can you explain the difference between the two queries below? Thanks
RETURNS 1 RESULT
db.getCollection("configurations").find(
{ key: 'co:food:LOYALTY_SERVICE_ENABLED' }
);
RETURNS 0 RESULT
db.getCollection("configurations").find(
{ key: '/.*LOYALTY_SERVICE_ENABLED' }
);
Equal SQL Query:Select * from configurations where key like '%LOYALTY_SERVICE_ENABLED';