在mongo 命令行下执行如下查询
db.users.find({})
能正常的读取集合中的所有数据,
但是执行如下查询命令,则报错
db.users.find({loginname:'test'})
error: {
"$err" : "Unable to execute query: error processing query: ns=im.users limit=0 skip=0\nTree: loginname == \"lidian\"\nSort: {}\nProj: {}\n No query solutions",
"code" : 17007
}
mongodb 配置的副本集(Replica Set)
There is no problem with the query statement. There should be an error somewhere else. Create a new table and test it
General query, no problem.
It’s no problem to check one.
Sir, you can check if there is a loginname field in your user collection.