您好,登录后才能下订单哦!
As asked, this is not possible. The server issue you linked to is still under"issues we're not sure of".
MongoDB has some intelligence surrounding the use of arrays, and I think that's part of the complexity surrounding such a feature.
Take the following querydb.foo.find({ 'a.b' : 4 } )
. This query will match the following documents.
{ a: { b: 4 } }{ a: [ { b: 4 } ] }
So what does "wildcard" do here?db.foo.find( { a.* : 4 } )
Does it match the first document? What about the second?
Moreover, what does this mean semantically? As you've described, the query is effectively"find documents where any field in that document has a value of 4". That's a little unusual.
Is there a specific semantic that you're trying to achieve? Maybe a change in the document structure will get you the query you want.
|
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。