Home > Backend Development > PHP Tutorial > MongoDB怎么做这种MVA搜索,如何设计结构?

MongoDB怎么做这种MVA搜索,如何设计结构?

WBOY
Release: 2016-06-06 20:48:13
Original
981 people have browsed it

MongoDB怎么做这种MVA搜索,如何设计结构?
中间的关系是and而非or

有一个想法是酱紫

<code class="lang-js">{
    _id:mongoid,
    title:title,
    another_title:[title1,title2]
    tags:[
        {category: [cate1,cate2,cate3]},
        {year:[2013]},
    ]
}
</code>
Copy after login
Copy after login

回复内容:

MongoDB怎么做这种MVA搜索,如何设计结构?
中间的关系是and而非or

有一个想法是酱紫

<code class="lang-js">{
    _id:mongoid,
    title:title,
    another_title:[title1,title2]
    tags:[
        {category: [cate1,cate2,cate3]},
        {year:[2013]},
    ]
}
</code>
Copy after login
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template