Skip to content

Commit 2e93b14

Browse files
authored
DOCSP-43826: v5.2 release (#175)
* DOCSP-43826: v5.2 release * test fixes * avs updates * wip * docs-shared updated * trim tables - MW * condense tables
1 parent f2576a5 commit 2e93b14

File tree

11 files changed

+22
-78
lines changed

11 files changed

+22
-78
lines changed

config/redirects

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
define: prefix docs/drivers/kotlin/coroutine
22
define: base https://www.mongodb.com/${prefix}
3-
define: versions v4.10 v4.11 v5.0 v5.1 master
3+
define: versions v4.10 v4.11 v5.0 v5.1 v5.2 master
44

55
raw: ${prefix}/ -> ${base}/current/
66

examples/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
kotlin.code.style=official
2-
kotlin_mongodb_version=5.1.4
2+
kotlin_mongodb_version=5.2.0

examples/src/test/kotlin/AggregatesBuilderTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import com.mongodb.client.model.geojson.Position
2828
import com.mongodb.client.model.search.SearchOperator
2929
import com.mongodb.client.model.search.SearchOptions
3030
import com.mongodb.client.model.search.SearchPath
31-
import com.mongodb.client.model.search.VectorSearchOptions.vectorSearchOptions
31+
import com.mongodb.client.model.search.VectorSearchOptions.exactVectorSearchOptions
3232
import com.mongodb.kotlin.client.coroutine.MongoClient
3333
import config.getConfig
3434
import kotlinx.coroutines.flow.firstOrNull
@@ -981,13 +981,13 @@ class AggregatesBuilderTest {
981981
SearchPath.fieldPath(MovieAlt::plotEmbedding.name),
982982
listOf(-0.0072121937, -0.030757688, -0.012945653),
983983
"mflix_movies_embedding_index",
984-
2.toLong(),
985984
1.toLong(),
986-
vectorSearchOptions().filter(Filters.gte(MovieAlt::year.name, 2016))
985+
exactVectorSearchOptions().filter(Filters.gte(MovieAlt::year.name, 2016))
987986
)
988987
// :snippet-end:
989988
)
990989
)
990+
991991
val results = resultsFlow.toList()
992992
assertEquals(1, resultsFlow.toList().size)
993993
assertEquals(1, results.first().get("count", Document::class.java).get("lowerBound", java.lang.Long::class.java)?.toInt())

examples/src/test/kotlin/SearchIndexesTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
import com.mongodb.client.model.SearchIndexModel
3+
import com.mongodb.client.model.SearchIndexType
34
import com.mongodb.kotlin.client.coroutine.MongoClient
45
import config.getConfig
56
import kotlinx.coroutines.flow.toList

snooty.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/"
1919
driver = "kotlin"
2020
driver-short = "Kotlin driver"
2121
driver-long = "MongoDB Kotlin Driver"
22-
version = "5.1"
23-
full-version = "{+version+}.4"
22+
version = "5.2"
23+
full-version = "{+version+}.0"
2424
language = "Kotlin"
2525
mdb-server = "MongoDB server"
2626
kotlin-docs = "https://kotlinlang.org"

source/examples/generated/AggregatesBuilderTest.snippet.vector-search.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ Aggregates.vectorSearch(
22
SearchPath.fieldPath(MovieAlt::plotEmbedding.name),
33
listOf(-0.0072121937, -0.030757688, -0.012945653),
44
"mflix_movies_embedding_index",
5-
2.toLong(),
65
1.toLong(),
7-
vectorSearchOptions().filter(Filters.gte(MovieAlt::year.name, 2016))
6+
exactVectorSearchOptions().filter(Filters.gte(MovieAlt::year.name, 2016))
87
)

source/fundamentals/builders/aggregates.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -932,13 +932,12 @@ The example in this section uses data modeled with the following Kotlin data cla
932932
:language: kotlin
933933

934934
This example shows how to build an aggregation pipeline that uses the
935-
``vectorSearch()`` method to perform a vector search with the following
935+
``vectorSearch()`` method to perform an exact vector search with the following
936936
specifications:
937937

938938
- Searches ``plotEmbedding`` field values by using vector embeddings of a
939939
string value
940940
- Uses the ``mflix_movies_embedding_index`` vector search index
941-
- Considers up to 2 nearest neighbors
942941
- Returns 1 document
943942
- Filters for documents in which the ``year`` value is at least ``2016``
944943

@@ -947,4 +946,4 @@ specifications:
947946

948947
To learn more about this helper, see the
949948
`vectorSearch() API documentation
950-
<{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#vectorSearch(com.mongodb.client.model.search.FieldSearchPath,java.lang.Iterable,java.lang.String,long,long)>`__.
949+
<{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#vectorSearch(com.mongodb.client.model.search.FieldSearchPath,java.lang.Iterable,java.lang.String,long,com.mongodb.client.model.search.VectorSearchOptions)>`__.

source/fundamentals/indexes.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,11 @@ The following code example shows how to create an Atlas Search index:
270270
.. literalinclude:: /examples/generated/SearchIndexesTest.snippet.single-search-index-create.kt
271271
:language: kotlin
272272

273+
To create multiple Search or Vector Search indexes, you must create a
274+
`SearchIndexModel
275+
<{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/SearchIndexModel.html>`__
276+
instance for each index.
277+
273278
The following code example shows how to create Search and
274279
Vector Search indexes in one call:
275280

source/includes/language-compatibility-table-kotlin.rst

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,5 @@
77
* - Kotlin Driver Version
88
- Kotlin 1.8
99

10-
* - 5.1
11-
- ✓
12-
13-
* - 5.0
14-
- ✓
15-
16-
* - 4.11
17-
- ✓
18-
19-
* - 4.10
10+
* - 4.10 to 5.2
2011
- ✓

source/includes/mongodb-compatibility-table-kotlin.rst

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
- MongoDB 4.2
1313
- MongoDB 4.0
1414
- MongoDB 3.6
15-
- MongoDB 3.4
16-
- MongoDB 3.2
17-
- MongoDB 3.0
18-
- MongoDB 2.6
1915

2016
* - 5.2
2117
- ✓
@@ -26,12 +22,8 @@
2622
- ✓
2723
- ✓
2824
- ✓
29-
-
30-
-
31-
-
32-
-
3325

34-
* - 5.1
26+
* - 4.10 to 5.1
3527
- ⊛
3628
- ✓
3729
- ✓
@@ -40,50 +32,3 @@
4032
- ✓
4133
- ✓
4234
- ✓
43-
-
44-
-
45-
-
46-
-
47-
48-
* - 5.0
49-
- ⊛
50-
- ✓
51-
- ✓
52-
- ✓
53-
- ✓
54-
- ✓
55-
- ✓
56-
- ✓
57-
-
58-
-
59-
-
60-
-
61-
62-
* - 4.11
63-
- ⊛
64-
- ✓
65-
- ✓
66-
- ✓
67-
- ✓
68-
- ✓
69-
- ✓
70-
- ✓
71-
-
72-
-
73-
-
74-
-
75-
76-
* - 4.10
77-
- ⊛
78-
- ✓
79-
- ✓
80-
- ✓
81-
- ✓
82-
- ✓
83-
- ✓
84-
- ✓
85-
-
86-
-
87-
-
88-
-
89-

source/whats-new.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ improvements, and fixes:
3535

3636
:ref:`kotlin-search-indexes` in the Indexes guide
3737

38+
.. replacement:: vector-search-link
39+
40+
:ref:`kotlin-atlas-vector-search` in the Aggregates Builders guide
41+
3842
- Adds support for serializers from the ``kotlinx-datetime`` library
3943
that let you map {+language+} date and time types to BSON as the
4044
expected types instead of as strings. To learn more, see the

0 commit comments

Comments
 (0)