Java implements nested query of mongodb data, preferably using springdata mongodb

there are two record: entries as follows

  1. query condition is type=gz--> detai is a List, there is an obj, query condition in this obj, and this filed is a List, depending on whether the value in it conforms to
  2. .
  3. query the entire document of all type with gz
  4. result should only find the first item, and the second item does not conform to
  5. .
  6. how to implement it, it"s best to use springdata mongdb

Thank you

{
    "name": "test",
    "location":"11",
    "isTrue":"11",
    "details": [
        {
        "remark": "121221",
        "type": ["bj","sh"],
        "group": ["123","123"]
        },
        {
        "remark": "321321",
        "type": ["sh","gz"],
        "group": ["123","123"]
        }
    ]
}
{
    "name": "test",
    "location":"11",
    "isTrue":"11",
    "details": [
        {
        "remark": "121221",
        "type": ["bj","sh","sz"],
        "group": ["123","123"]
        },
        {
        "remark": "321321",
        "type": ["sh"],
        "group": ["123","123"]
        }
    ]
}
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-1b35c52-e50d.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-1b35c52-e50d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?