MongoDB - Can't canonicalize query: BadValue unknown operator: $meta

前端 未结 1 697
情书的邮戳
情书的邮戳 2021-01-11 09:48

This happened to me in 2.6.1 - So, in case anyone wanders into this error, I thought I\'d write the answer out.

This first command worked fine, but the second one d

相关标签:
1条回答
  • 2021-01-11 10:43

    Turns out I just had the brackets in the wrong place.. and it should have read.

    //This works
    db.test.find(
        { $text: { $search: 'york' } },
        { score: { $meta: 'textScore' } }
    );
    
    0 讨论(0)
提交回复
热议问题