Skip to content

Commit a1c9cf9

Browse files
committed
DOCSP-43826: v5.2 release
1 parent ad1445a commit a1c9cf9

File tree

8 files changed

+28
-34
lines changed

8 files changed

+28
-34
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/java/sync
22
define: base https://www.mongodb.com/${prefix}
3-
define: versions v4.3 v4.4 v4.5 v4.6 v4.7 v4.8 v4.9 v4.10 v4.11 v5.0 v5.1 master
3+
define: versions v4.3 v4.4 v4.5 v4.6 v4.7 v4.8 v4.9 v4.10 v4.11 v5.0 v5.1 v5.2 master
44

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

snooty.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/"
2020
driver = "java"
2121
driver-long = "MongoDB Java Driver"
2222
driver-short = "Java driver"
23-
version = "5.1"
24-
full-version = "{+version+}.4"
23+
version = "5.2"
24+
full-version = "{+version+}.0"
2525
mdb-server = "MongoDB Server"
2626
package-name-org = "mongodb-org"
2727
api = "https://mongodb.github.io/mongo-java-driver/{+version+}"

source/fundamentals/builders/aggregates.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -992,15 +992,17 @@ Atlas Vector Search
992992
:atlas:`Limitations </atlas-vector-search/vector-search-stage/#limitations>`
993993
in the MongoDB Atlas documentation.
994994

995-
Use the ``vectorSearch()`` method to create a :atlas:`$vectorSearch </atlas-vector-search/vector-search-stage/>`
995+
Use the ``vectorSearch()`` method to create a :atlas:`$vectorSearch
996+
</atlas-vector-search/vector-search-stage/>`
996997
pipeline stage that specifies a **semantic search**. A semantic search is
997998
a type of search which locates information that is similar in meaning.
998999

9991000
To use this feature, you must set up a vector search index and index your
10001001
vector embeddings. To learn about how to programmatically create a
10011002
vector search index, see the :ref:`java-search-indexes` section in the Indexes guide. To
10021003
learn more about vector embeddings, see
1003-
:atlas:`How to Index Vector Embeddings for Vector Search </atlas-search/field-types/knn-vector/>`.
1004+
:atlas:`How to Index Vector Embeddings for Vector Search
1005+
</atlas-search/field-types/knn-vector/>`.
10041006

10051007
The following example shows how to build an aggregation pipeline that uses the
10061008
``vectorSearch()`` and ``project()`` methods to compute a vector search score:
@@ -1020,5 +1022,7 @@ preceding aggregation pipeline:
10201022
:language: java
10211023
:dedent:
10221024

1023-
Learn more about this helper from the
1024-
`vectorSearch() <{+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)>`__ API documentation.
1025+
Learn more about this helper in the
1026+
`vectorSearch()
1027+
<{+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)>`__
1028+
API documentation.

source/fundamentals/indexes.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,11 @@ The following code example shows how to create an Atlas Search index:
257257
:start-after: start create-search-index
258258
:end-before: end create-search-index
259259

260+
To create multiple Search or Vector Search indexes, you must create a
261+
`SearchIndexModel
262+
<{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/SearchIndexModel.html>`__
263+
instance for each index.
264+
260265
The following code example shows how to create Search and
261266
Vector Search indexes in one call:
262267

source/includes/fundamentals/code-snippets/SearchIndexMethods.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.mongodb.client.*;
44
import com.mongodb.client.model.SearchIndexModel;
5+
import com.mongodb.client.model.SearchIndexType;
56
import org.bson.Document;
67

78
import java.util.Arrays;

source/includes/fundamentals/code-snippets/builders/AggBuilders.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import static com.mongodb.client.model.Sorts.*;
88
import static com.mongodb.client.model.Accumulators.*;
99
import static com.mongodb.client.model.search.SearchPath.fieldPath;
10-
import static com.mongodb.client.model.search.VectorSearchOptions.vectorSearchOptions;
10+
import static com.mongodb.client.model.search.VectorSearchOptions.exactVectorSearchOptions;
1111
import static java.util.Arrays.asList;
1212
// end static import
1313

@@ -317,16 +317,14 @@ private void vectorSearchPipeline() {
317317
List<Double> queryVector = (asList(-0.0072121937, -0.030757688, -0.012945653));
318318
String indexName = "mflix_movies_embedding_index";
319319
FieldSearchPath fieldSearchPath = fieldPath("plot_embedding");
320-
int numCandidates = 2;
321320
int limit = 1;
322-
VectorSearchOptions options = vectorSearchOptions().filter(gte("year", 2016));
321+
VectorSearchOptions options = exactVectorSearchOptions().filter(gte("year", 2016));
323322

324323
List<Bson> pipeline = asList(
325324
vectorSearch(
326325
fieldSearchPath,
327326
queryVector,
328327
indexName,
329-
numCandidates,
330328
limit,
331329
options),
332330
project(

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

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,7 @@
1212
- Java 6
1313
- Java 5
1414

15-
* - 5.1
16-
- ✓
17-
- ✓
18-
- ✓
19-
- ✓
20-
-
21-
-
22-
-
23-
24-
* - 5.0
25-
- ✓
26-
- ✓
27-
- ✓
28-
- ✓
29-
-
30-
-
31-
-
32-
33-
* - 4.11
15+
* - 4.11 to 5.2
3416
- ✓
3517
- ✓
3618
- ✓

source/whats-new.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ What's New in 5.2
4747

4848
New features of the 5.2 driver release include:
4949

50-
- A forward-slash (``/``) character between the host names and client options in a
51-
connection URI is optional. The driver parses the following connection URI
52-
examples in the same way:
50+
- A forward-slash (``/``) character between the host names and client
51+
options in a connection URI is optional. The driver parses the
52+
following connection URI examples in the same way:
5353

5454
.. code-block:: java
5555

@@ -63,8 +63,12 @@ New features of the 5.2 driver release include:
6363

6464
.. replacement:: avs-index-link
6565

66-
:ref:`java-search-indexes` in the Indexes guide
66+
:ref:`java-search-indexes` in the Indexes guide
6767

68+
.. replacement:: vector-search-link
69+
70+
:ref:`java-atlas-vector-search` in the Aggregates Builders guide
71+
6872
.. _java-version-5.1.3:
6973

7074
What's New in 5.1.3

0 commit comments

Comments
 (0)