Mongodb find query reported an error.

  mongodb, question

Execute the following query on the mongo command line


Can normally read all data in the set,
However, if the following query command is executed, an error will be reported

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

Replica Set for mongodb configuration

  • There is no problem with the query statement, it should be that there is something wrong elsewhere to rebuild a table and test it.