Error: no globalScriptEngine in $where parsing

##############

 

使用mongodb聚合查询,在$where条件中使用了javascript表达式,执行报错误:

no globalScriptEngine in $where parsing
可通过修改mongodb配置文件中的javascriptEnabled为true解决:

security:
  javascriptEnabled: true

 

 

 

 

 

 

 

 

 

 

 

###############

 

##########

posted @ 2021-12-01 11:22  igoodful  阅读(399)  评论(0编辑  收藏  举报