Mongodb query

A document with the following structure needs to match the value under property according to the search criteria. As long as one is matched, the result set is calculated

.
:db.coll.find({"property":{"test1_field_1":/a/}}) 

property 



{
    "_id" : ObjectId("5aaf36743e178f2e540cb6e9"),
    "property" : {
        "test1_field_1" : "acd",
        "test1_field_2" : "3",
        "xxx_field" : "hell",
        "field_unknown" : "hello world"
    }
}
Mar.02,2021

if changing the document structure is an acceptable solution, consider changing property to an array:

  official documentation-multikey indexes  

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a5ba-345b9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a5ba-345b9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?