Skip to content

Commit d0b3027

Browse files
committed
format
1 parent dcdd743 commit d0b3027

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

source/aggregation.txt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -218,26 +218,26 @@ You can build a Atlas Search pipeline stage using search operators.
218218
.. input::
219219
:language: kotlin
220220

221-
val searchStage: Bson = Aggregates.search(
222-
SearchOperator.compound()
223-
.filter(
224-
listOf(
225-
SearchOperator.text(fieldPath("genres"), "Drama"),
226-
SearchOperator.phrase(fieldPath("cast"), "sylvester stallone"),
227-
SearchOperator.numberRange(fieldPath("year")).gtLt(1980, 1989),
228-
SearchOperator.wildcard(fieldPath("title"), "Rocky *")
229-
)
221+
val searchStage: Bson = Aggregates.search(
222+
SearchOperator.compound()
223+
.filter(
224+
listOf(
225+
SearchOperator.text(fieldPath("genres"), "Drama"),
226+
SearchOperator.phrase(fieldPath("cast"), "sylvester stallone"),
227+
SearchOperator.numberRange(fieldPath("year")).gtLt(1980, 1989),
228+
SearchOperator.wildcard(fieldPath("title"), "Rocky *")
230229
)
231-
)
230+
)
231+
)
232232

233-
val projection = Projections.fields(
234-
Projections.include("title", "year", "genres", "cast")
235-
)
233+
val projection = Projections.fields(
234+
Projections.include("title", "year", "genres", "cast")
235+
)
236236

237-
val aggregatePipelineStages: List<Bson> = listOf(searchStage, Aggregates.project(projection))
238-
val results = collection.aggregate<Document>(aggregatePipelineStages)
239-
240-
results.forEach { result -> println(result) }
237+
val aggregatePipelineStages: List<Bson> = listOf(searchStage, Aggregates.project(projection))
238+
val results = collection.aggregate<Document>(aggregatePipelineStages)
239+
240+
results.forEach { result -> println(result) }
241241

242242
.. output::
243243
:language: console

0 commit comments

Comments
 (0)