$and query returns no result

前端 未结 2 1242
温柔的废话
温柔的废话 2021-01-25 13:33

Ok this one is killing me. Maybe its late and I am forgetting something, but this should work.

For test purposes, I have about 6000 documents in my collection. There i

2条回答
  •  故里飘歌
    2021-01-25 14:09

    If I said, "I need someone with a car that can seat four people and a car that can seat at least eight people", someone with a single car that sat eight people would not ordinarily be understood to qualify. Your and query can only be satisfied by an entry with two values for Priority, one less than 10 and one greater than 1.

    The docs for and have a link to the multikey semantics of mongoDB.

提交回复
热议问题