mongodb能不能搜索多层嵌套子文档中的任意内容?
阿神
阿神 2017-04-27 09:02:16
0
2
564

比如,能不能搜素N层嵌套中的键或者值

阿神
阿神

闭关修行中......

reply all(2)
大家讲道理

You can do it. As long as you can locate the position of the array containing the sub-document, you can search for what you want. You can check my previous answer:

/q/1010000002943721/a-1020000003716002

If it does not meet your requirements, you can describe your problem in more detail, such as what the data structure you imagine looks like and what kind of search you want to do

阿神

No problem, you can refer to the official documentation directly

https://docs.mongodb.org/manual/tutorial/query-documents/#embedded-documents

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template