Skip to content

Commit 298c482

Browse files
committed
NX feedback
1 parent 022113d commit 298c482

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

source/atlas-vector-search.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Overview
2424
In this guide, you can learn how to use the {+driver-short+} to perform
2525
:atlas:`Atlas Vector Search </atlas-vector-search/vector-search-overview/>`
2626
queries. The ``Aggregates`` builders class provides the
27-
the ``vectorSearch()`` helper method, which you can use to
27+
``vectorSearch()`` helper method, which you can use to
2828
create a :atlas:`$vectorSearch </atlas-vector-search/vector-search-stage/>`
2929
pipeline stage.
3030

@@ -118,9 +118,6 @@ guide, see the following API documentation:
118118
- `Aggregates.vectorSearch()
119119
<{+core-api+}/client/model/Aggregates.html#vectorSearch(com.mongodb.client.model.search.FieldSearchPath,java.lang.Iterable,java.lang.String,long,com.mongodb.client.model.search.VectorSearchOptions)>`__
120120

121-
- `FieldSearchPath
122-
<{+core-api+}/client/model/search/FieldSearchPath.html>`__
123-
124121
- `VectorSearchOptions
125122
<{+core-api+}/client/model/search/VectorSearchOptions.html>`__
126123

source/includes/vector-search.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fun main() {
3333
// Specifies the path of the field to search
3434
val fieldSearchPath: FieldSearchPath = fieldPath("plot_embedding")
3535

36-
// Creates the vector search pipeline stage with numCandidates and limit
36+
// Creates the vector search pipeline stage with a limit and numCandidates
3737
val pipeline: List<Bson> = listOf(
3838
vectorSearch(
3939
fieldSearchPath,
@@ -63,7 +63,7 @@ fun main() {
6363
fieldSearchPath,
6464
queryVector,
6565
indexName,
66-
5L, // limit parameter
66+
5L,
6767
approximateVectorSearchOptions(150)
6868
),
6969
project(
@@ -78,7 +78,6 @@ fun main() {
7878
val results = collection.aggregate(pipeline)
7979

8080
results.forEach { doc ->
81-
val score = doc.getDouble("vectorSearchScore")
8281
println("Title: ${doc.getString("title")}, Score: ${doc.getDouble("score")}")
8382
}
8483
// end-vs-score

0 commit comments

Comments
 (0)