java操作mongoDB实现按两个字段排序的问题

    java操作mongoDB,想通过先按照某一字段排序,在该字段中有相同值时按照另一字段排序,怎么实现?
    db.adult.find().sort({age:1,label,1})是直接操作mongoDB的代码

import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase;
import org.bson.Document;
import org.bson.conversions.Bson;

import java.util.ArrayList;
import java.util.List;

import static com.mongodb.client.model.Sorts.ascending;

public class SortByMultipleFields {
    public static void main(String[] args) {
        // 连接MongoDB数据库
        MongoDatabase database = ...;
        MongoCollection<Document> collection = database.getCollection("adult");
        
        // 构建排序规则
        List<Bson> sortOrder = new ArrayList<>();
        sortOrder.add(ascending("age"));
        sortOrder.add(ascending("label"));
        Bson sort = new Document("$orderby", sortOrder);
        
        // 按照排序规则查询
        List<Document> results = collection.find().sort(sort).into(new ArrayList<>());
        
        // 输出结果
        for (Document result : results) {
            System.out.println(result);
        }
    }
}

.sort(fields) Order by the given fields. There are several equivalent syntaxes:
.sort({field1: -1, field2: 1}) descending by field1, then ascending by field2.
.sort([['field1', 'desc'], ['field2', 'asc']]) same as above
.sort([['field1', 'desc'], 'field2']) same as above
.sort('field1') ascending by field1