mongodb的通配符查询的一次失败经验
创新互联长期为1000+客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为滨海新区企业提供专业的成都网站建设、成都做网站,滨海新区网站改版等技术服务。拥有10余年丰富建站经验和众多成功案例,为您定制开发。
但是1,2这个info信息字段不确定
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.
|
当前标题:mongodb的通配符查询的一次失败经验
本文地址:http://cdiso.cn/article/pggdph.html