问题 just wondering if anyone can come up with a smarter way to do this... Let's say I have some documents in MongoDB with a version property, for example something like { ..., version: { major: 1, minor: 2, patch: 13 } } , or { ..., version: "1.2.13" } if it is easier. What's the easiest way to find all documents that have version X.Y.Z or above? The way I'm doing it now is basically a huge $and clause. 回答1: Your first design is actually very good. The reason is because you can index the fields