diff --git a/docs/50-aggregation/2-match-project.mdx b/docs/50-aggregation/2-match-project.mdx index 881729a..ad0b93b 100644 --- a/docs/50-aggregation/2-match-project.mdx +++ b/docs/50-aggregation/2-match-project.mdx @@ -232,11 +232,15 @@ db.books.aggregate([ ```java books.aggregate( List.of( - Aggregates.match(gt( - "available", 2)), - Aggregates.project(Projections.include("title", "year")), - Aggregates.project(Projections.exclude("_id"))) - ).forEach(document -> System.out.println(document.toJson())); + Aggregates.match(gt("available", 2)), + Aggregates.project( + Projections.fields( + Projections.include("title", "year"), + Projections.exclude("_id") + ) + ) + ) + ).forEach(document -> System.out.println(document.toJson())); ```