We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 87d93b2 + 1c4d940 commit 9d1f1ddCopy full SHA for 9d1f1dd
docs/40-CRUD/2-SELECT.mdx
@@ -216,6 +216,8 @@ Here:
216
<TabItem value="java" label="Java">
217
<div>
218
```java
219
+ import static com.mongodb.client.model.Filters.eq;
220
+
221
Bson filter = eq("genres", "History");
222
Bson projection = Projections.fields(
223
Projections.exclude("_id", "authors")
docs/40-CRUD/3-ORDER-LIMIT.mdx
@@ -112,6 +112,8 @@ This returns the **top 10 available books** in the "Science Fiction" genre.
112
113
114
115
+ import static com.mongodb.client.model.Sorts.descending;
116
117
List<Document> results = books.find()
118
.sort(descending("title"))
119
.limit(10)
0 commit comments