@Override
    public Flux<String> findObjectFields(
            Class<?> clazz,
            Filter filter,
            String parentField,
            Collection<String> includedFields) {
        MongoCollection<?> collection = context.getCollection(clazz);
        BsonArray includedFieldsArray = new BsonArray(includedFields.size());
        for (String includedField : includedFields) {
            includedFieldsArray.add(new BsonString(includedField));
        }
        List<Bson> pipeline = List.of(Aggregates.match(filter), Aggregates.project(new Bson() {
            @Override
            public <T> BsonDocument toBsonDocument(
                    Class<T> tDocumentClass,
                    CodecRegistry codecRegistry) {
                return new BsonDocument().append("_id",
                        new BsonDocument().append("$map",
                                new BsonDocument()
                                        .append("input",
                                                new BsonDocument().append("$objectToArray",
                                                        new BsonString(
                                                                "$"
                                                                        + parentField)))
                                        .append("as", new BsonString("field"))
                                        .append("in", FIND_OBJECT_KEYS_GET_FIELD_OPERATOR)));
            }
        }),
                Aggregates.unwind("$_id"),
                Aggregates.match(new BsonDocument().append("_id",
                        new BsonDocument().append("$in", includedFieldsArray))));
        AggregatePublisher<Document> names = collection.aggregate(pipeline, Document.class);
        return Flux.from(names)
                .map(document -> document.get("_id")
                        .toString());
    }
@author James Chen
@implNote 1. We operate in an unsafe way, which means we don't check whether arguments are legal
          or not and so on 2. The publishers of mongo-java-driver are cold and the publishers of
          TurmsMongoOperations are also cold Reference:
          https://github.com/mongodb/mongo/blob/master/src/mongo/shell/utils_sh.js
turms-server-common/src/main/java/im/turms/server/common/storage/mongo/operation/TurmsMongoOperations.java