Skip to content

Commit 51019ef

Browse files
authored
DOCSP-43826: v5.2 release (#574)
* DOCSP-43826: v5.2 release * link fix and trim table * trim * trim
1 parent ad1445a commit 51019ef

File tree

9 files changed

+31
-575
lines changed

9 files changed

+31
-575
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: 2 additions & 200 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
- Java 6
1313
- Java 5
1414

15-
* - 5.1
15+
* - 4.11 to 5.2
1616
- ✓
1717
- ✓
1818
- ✓
@@ -21,70 +21,7 @@
2121
-
2222
-
2323

24-
* - 5.0
25-
- ✓
26-
- ✓
27-
- ✓
28-
- ✓
29-
-
30-
-
31-
-
32-
33-
* - 4.11
34-
- ✓
35-
- ✓
36-
- ✓
37-
- ✓
38-
-
39-
-
40-
-
41-
42-
* - 4.10
43-
- ✓ [#virtual-threads-note]_
44-
- ✓
45-
- ✓
46-
- ✓
47-
-
48-
-
49-
-
50-
51-
* - 4.9
52-
- ✓ [#virtual-threads-note]_
53-
- ✓
54-
- ✓
55-
- ✓
56-
-
57-
-
58-
-
59-
60-
* - 4.8
61-
- ✓ [#virtual-threads-note]_
62-
- ✓
63-
- ✓
64-
- ✓
65-
-
66-
-
67-
-
68-
69-
* - 4.7
70-
- ✓ [#virtual-threads-note]_
71-
- ✓
72-
- ✓
73-
- ✓
74-
-
75-
-
76-
-
77-
78-
* - 4.6
79-
- ✓ [#virtual-threads-note]_
80-
- ✓
81-
- ✓
82-
- ✓
83-
-
84-
-
85-
-
86-
87-
* - 4.5
24+
* - 4.7 to 4.10
8825
- ✓ [#virtual-threads-note]_
8926
- ✓
9027
- ✓
@@ -93,139 +30,4 @@
9330
-
9431
-
9532

96-
* - 4.4
97-
-
98-
- ✓
99-
- ✓
100-
- ✓
101-
-
102-
-
103-
-
104-
105-
* - 4.3
106-
-
107-
-
108-
- ✓
109-
- ✓
110-
-
111-
-
112-
-
113-
114-
* - 4.2
115-
-
116-
-
117-
- ✓
118-
- ✓
119-
-
120-
-
121-
-
122-
123-
* - 4.1
124-
-
125-
-
126-
- ✓
127-
- ✓
128-
-
129-
-
130-
-
131-
132-
* - 4.0
133-
-
134-
-
135-
- ✓
136-
- ✓
137-
-
138-
-
139-
-
140-
141-
* - 3.12
142-
-
143-
-
144-
- ✓
145-
- ✓
146-
- ✓
147-
- ✓
148-
-
149-
150-
* - 3.11
151-
-
152-
-
153-
- ✓
154-
- ✓
155-
- ✓
156-
- ✓
157-
-
158-
159-
* - 3.10
160-
-
161-
-
162-
- ✓
163-
- ✓
164-
- ✓
165-
- ✓
166-
-
167-
168-
* - 3.9
169-
-
170-
-
171-
- ✓
172-
- ✓
173-
- ✓
174-
- ✓
175-
-
176-
177-
* - 3.8
178-
-
179-
-
180-
- ✓
181-
- ✓
182-
- ✓
183-
- ✓
184-
-
185-
186-
* - 3.4
187-
-
188-
-
189-
- ✓
190-
- ✓
191-
- ✓
192-
- ✓
193-
-
194-
195-
* - 3.3
196-
-
197-
-
198-
- ✓
199-
- ✓
200-
- ✓
201-
- ✓
202-
-
203-
204-
* - 3.2
205-
-
206-
-
207-
- ✓
208-
- ✓
209-
- ✓
210-
- ✓
211-
-
212-
213-
* - 3.1
214-
-
215-
-
216-
- ✓
217-
- ✓
218-
- ✓
219-
- ✓
220-
-
221-
222-
* - 3.0
223-
-
224-
-
225-
- ✓
226-
- ✓
227-
- ✓
228-
- ✓
229-
-
230-
23133
.. [#virtual-threads-note] This driver version is not compatible with virtual threads.

0 commit comments

Comments
 (0)