Skip to content

Commit a502497

Browse files
authored
Backport 655 to v5.0 (#662)
* [Java Sync] P1 - Shift Java ToC (#615) * fix redirects (#616) * [Java Sync] P2 - Shift Java ToC (#617) * toc tweaks * databases adn collections * rm reference landing * vale error
1 parent 453a4eb commit a502497

File tree

86 files changed

+461
-237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+461
-237
lines changed

.github/workflows/vale-tdbx.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ jobs:
1212
- name: checkout
1313
uses: actions/checkout@master
1414

15+
- name: Install docutils
16+
run: sudo apt-get install -y docutils
17+
1518
- id: files
1619
uses: masesgroup/retrieve-changed-files@v2
1720
with:

config/redirects

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,67 @@ define: versions v4.3 v4.4 v4.5 v4.6 v4.7 v4.8 v4.9 v4.10 v4.11 v5.0 master
55
raw: ${prefix}/ -> ${base}/current/
66
raw: ${prefix}/master -> ${base}/upcoming/
77

8-
[*-master]: ${prefix}/${version}/fundamentals/versioned-api/ -> ${base}/${version}/fundamentals/stable-api/
8+
[*-v5.2]: ${prefix}/${version}/fundamentals/versioned-api/ -> ${base}/${version}/fundamentals/stable-api/
99
[*-v4.6]: ${prefix}/${version}/fundamentals/crud/read-operations/change-streams/ -> ${base}/${version}/fundamentals/crud/read-operations/retrieve/
1010
[*-master]: ${prefix}/${version}/fundamentals/csfle/ -> ${base}/${version}/fundamentals/encrypt-fields/
1111
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/change-a-document/ -> ${base}/${version}/fundamentals/crud/write-operations/modify/
1212
[*-v4.10]: ${prefix}/${version}/fundamentals/connection/socks/ -> ${base}/${version}/
1313
[*-v4.8]: ${prefix}/${version}/connection-troubleshooting/ -> ${base}/${version}/
14+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/ -> ${base}/${version}/crud/
15+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/read-operations/ -> ${base}/${version}/crud/read-operations/
16+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/read-operations/retrieve/ -> ${base}/${version}/crud/read-operations/retrieve/
17+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/read-operations/cursor/ -> ${base}/${version}/crud/read-operations/cursor/
18+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/read-operations/change-streams/ -> ${base}/${version}/logging-monitoring/change-streams/
19+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/read-operations/sort/ -> ${base}/${version}/crud/read-operations/sort/
20+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/read-operations/skip/ -> ${base}/${version}/crud/read-operations/skip/
21+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/read-operations/limit/ -> ${base}/${version}/crud/read-operations/limit/
22+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/read-operations/project/ -> ${base}/${version}/crud/read-operations/project/
23+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/read-operations/geo/ -> ${base}/${version}/crud/read-operations/geo/
24+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/read-operations/text/ -> ${base}/${version}/crud/read-operations/text/
25+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/write-operations/ -> ${base}/${version}/crud/write-operations/
26+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/write-operations/insert/ -> ${base}/${version}/crud/write-operations/insert/
27+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/write-operations/delete/ -> ${base}/${version}/crud/write-operations/delete/
28+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/write-operations/modify/ -> ${base}/${version}/crud/write-operations/modify/
29+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/write-operations/embedded-arrays/ -> ${base}/${version}/crud/write-operations/embedded-arrays/
30+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/write-operations/upsert/ -> ${base}/${version}/crud/write-operations/upsert/
31+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/write-operations/bulk/ -> ${base}/${version}/crud/write-operations/bulk/
32+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/query-document/ -> ${base}/${version}/crud/query-document/
33+
[v5.0-master]: ${prefix}/${version}/fundamentals/crud/compound-operations/ -> ${base}/${version}/crud/compound-operations/
34+
[v5.0-master]: ${prefix}/${version}/fundamentals/data-formats/ -> ${base}/${version}/data-formats/
35+
[v5.0-master]: ${prefix}/${version}/fundamentals/data-formats/document-data-format-bson/ -> ${base}/${version}/data-formats/document-data-format-bson/
36+
[v5.0-master]: ${prefix}/${version}/fundamentals/data-formats/document-data-format-extended-json/ -> ${base}/${version}/data-formats/document-data-format-extended-json/
37+
[v5.0-master]: ${prefix}/${version}/fundamentals/data-formats/documents/ -> ${base}/${version}/data-formats/documents/
38+
[v5.0-master]: ${prefix}/${version}/fundamentals/data-formats/document-data-format-pojo/ -> ${base}/${version}/data-formats/document-data-format-pojo/
39+
[v5.0-master]: ${prefix}/${version}/fundamentals/data-formats/document-data-format-record/ -> ${base}/${version}/data-formats/document-data-format-record/
40+
[v5.0-master]: ${prefix}/${version}/fundamentals/data-formats/pojo-customization/ -> ${base}/${version}/data-formats/pojo-customization/
41+
[v5.0-master]: ${prefix}/${version}/fundamentals/data-formats/codecs/ -> ${base}/${version}/data-formats/codecs/
42+
[v5.0-master]: ${prefix}/${version}/fundamentals/connection/ -> ${base}/${version}/connection/
43+
[v5.0-master]: ${prefix}/${version}/fundamentals/connection/connect/ -> ${base}/${version}/connection/connect/
44+
[v5.0-master]: ${prefix}/${version}/fundamentals/connection/connection-options/ -> ${base}/${version}/connection/connection-options/
45+
[v5.0-master]: ${prefix}/${version}/fundamentals/connection/mongoclientsettings/ -> ${base}/${version}/connection/mongoclientsettings/
46+
[v5.0-master]: ${prefix}/${version}/fundamentals/connection/network-compression/ -> ${base}/${version}/connection/network-compression/
47+
[v5.0-master]: ${prefix}/${version}/fundamentals/connection/socks/ -> ${base}/${version}/connection/socks/
48+
[v5.0-master]: ${prefix}/${version}/fundamentals/connection/tls/ -> ${base}/${version}/security/tls/
49+
[v5.0-master]: ${prefix}/${version}/fundamentals/connection/jndi/ -> ${base}/${version}/connection/jndi/
50+
[v5.0-master]: ${prefix}/${version}/fundamentals/builders/ -> ${base}/${version}/crud/builders/
51+
[v5.0-master]: ${prefix}/${version}/fundamentals/builders/aggregates/ -> ${base}/${version}/crud/builders/aggregates/
52+
[v5.0-master]: ${prefix}/${version}/fundamentals/builders/filters/ -> ${base}/${version}/crud/builders/filters/
53+
[v5.0-master]: ${prefix}/${version}/fundamentals/builders/indexes/ -> ${base}/${version}/crud/builders/indexes/
54+
[v5.0-master]: ${prefix}/${version}/fundamentals/builders/projections/ -> ${base}/${version}/crud/builders/projections/
55+
[v5.0-master]: ${prefix}/${version}/fundamentals/builders/sort/ -> ${base}/${version}/crud/builders/sort/
56+
[v5.0-master]: ${prefix}/${version}/fundamentals/builders/updates/ -> ${base}/${version}/crud/builders/updates/
57+
[v5.0-master]: ${prefix}/${version}/fundamentals/builders/vector-search -> ${base}/${version}/atlas-vector-search/
58+
[v5.0-master]: ${prefix}/${version}/fundamentals/aggregation/ -> ${base}/${version}/crud/aggregation/
59+
[v5.0-master]: ${prefix}/${version}/fundamentals/aggregation-expression-operations/ -> ${base}/${version}/crud/aggregation-expression-operations/
60+
[v5.0-master]: ${prefix}/${version}/fundamentals/collations/ -> ${base}/${version}/crud/collations/
61+
[v5.0-master]: ${prefix}/${version}/fundamentals/stable-api/ -> ${base}/${version}/connection/stable-api/
62+
[v5.0-master]: ${prefix}/${version}/connection-troubleshooting/ -> ${base}/${version}/connection/connection-troubleshooting/
63+
[v5.0-master]: ${prefix}/${version}/fundamentals/gridfs/ -> ${base}/${version}/crud/gridfs/
64+
[v5.0-master]: ${prefix}/${version}/fundamentals/transactions/ -> ${base}/${version}/crud/transactions/
65+
[v5.0-master]: ${prefix}/${version}/fundamentals/time-series/ -> ${base}/${version}/data-formats/time-series/
66+
[v5.0-master]: ${prefix}/${version}/quick-start/ -> ${base}/${version}/getting-started/
67+
[v5.0-master]: ${prefix}/${version}/fundamentals/databases-collections/ -> ${base}/${version}/getting-started/databases-collections/
68+
[v5.0-master]: ${prefix}/${version}/integrations/ -> ${base}/${version}/getting-started/integrations/
69+
[v5.0-master]: ${prefix}/${version}/quick-reference/ -> ${base}/${version}/getting-started/quick-reference/
70+
[v5.0-master]: ${prefix}/${version}/fundamentals/enterprise-auth/ -> ${base}/${version}/security/enterprise-auth/
71+
[v5.0-master]: ${prefix}/${version}/connection/socks/ -> ${base}/${version}/security/socks/

snooty.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ intersphinx = [
77
]
88

99
toc_landing_pages = [
10-
"/fundamentals/connection",
11-
"/fundamentals/crud",
12-
"/fundamentals/builders",
13-
"/fundamentals/aggregation",
14-
"/usage-examples",
10+
"/getting-started",
11+
"/connection",
12+
"/crud",
13+
"/aggregation",
14+
"/builders",
15+
"/data-formats",
16+
"/api-documentation"
1517
]
1618
sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/"
1719

source/fundamentals/aggregation.txt renamed to source/aggregation.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Aggregation
1717
:depth: 2
1818
:class: singlecol
1919

20+
.. toctree::
21+
22+
Aggregation Expressions </aggregation/aggregation-expression-operations>
23+
2024
Overview
2125
--------
2226

source/atlas-search.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.. _java-atlas-search:
2+
3+
============
4+
Atlas Search
5+
============
6+
7+
.. facet::
8+
:name: genre
9+
:values: reference
10+
11+
.. meta::
12+
:keywords: full text, text analyzer, meta, pipeline, scoring, Lucene
13+
:description: Learn about how to use Atlas Search in the {+driver-long+}.
14+
15+
.. contents:: On this page
16+
:local:
17+
:backlinks: none
18+
:depth: 2
19+
:class: singlecol
20+
21+
See :atlas:`Atlas Search </atlas-search/>` in the MongoDB Atlas documentation.

source/atlas-vector-search.txt

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
.. _java-atlas-vector-search:
2+
3+
===================
4+
Atlas Vector Search
5+
===================
6+
7+
.. facet::
8+
:name: genre
9+
:values: reference
10+
11+
.. meta::
12+
:keywords: full text, text analyzer, meta, pipeline, scoring, Lucene, AI, artificial intelligence, code example, semantic, nearest
13+
:description: Learn about how to use Atlas Vector Search in the {+driver-long+}.
14+
15+
.. contents:: On this page
16+
:local:
17+
:backlinks: none
18+
:depth: 2
19+
:class: singlecol
20+
21+
Overview
22+
--------
23+
24+
In this guide, you can learn how to use the :atlas:`Atlas Vector Search
25+
</atlas-vector-search/vector-search-overview/>` feature
26+
in the {+driver-short+}. The ``Aggregates`` builders class provides the
27+
the ``vectorSearch()`` helper method that you can use to
28+
create a :atlas:`$vectorSearch </atlas-vector-search/vector-search-stage/>`
29+
pipeline stage. This pipeline stage allows you to perform a **semantic
30+
search** on your documents. A semantic search is a type of search which
31+
locates information that is similar in meaning, but not necessarily
32+
identical, to your provided search term or phrase.
33+
34+
.. important:: Feature Compatibility
35+
36+
To learn what versions of MongoDB Atlas support this feature, see
37+
:atlas:`Limitations </atlas-vector-search/vector-search-stage/#limitations>`
38+
in the MongoDB Atlas documentation.
39+
40+
Perform a Vector Search
41+
-----------------------
42+
43+
To use this feature, you must create a vector search index and index your
44+
vector embeddings. To learn about how to programmatically create a
45+
vector search index, see the :ref:`java-search-indexes` section in the
46+
Indexes guide. To learn more about vector embeddings, see
47+
:atlas:`How to Index Vector Embeddings for Vector Search
48+
</atlas-search/field-types/knn-vector/>` in the Atlas documentation.
49+
50+
After you create a vector search index on your vector embeddings, you
51+
can reference this index in your pipeline stage, as shown in the
52+
following section.
53+
54+
Vector Search Example
55+
~~~~~~~~~~~~~~~~~~~~~
56+
57+
The following example shows how to build an aggregation pipeline that uses the
58+
``vectorSearch()`` and ``project()`` methods to compute a vector search score:
59+
60+
.. literalinclude:: /includes/fundamentals/code-snippets/builders/AggBuilders.java
61+
:start-after: // begin vectorSearch
62+
:end-before: // end vectorSearch
63+
:language: java
64+
:dedent:
65+
66+
.. tip:: Query Vector Type
67+
68+
The preceding example creates an instance of ``BinaryVector`` to
69+
serve as the query vector, but you can also create a ``List`` of
70+
``Double`` instances. However, we recommend that you use the
71+
``BinaryVector`` type to improve storage efficiency.
72+
73+
The following example shows how you can run the aggregation and print
74+
the vector search meta-score from the result of the preceding
75+
aggregation pipeline:
76+
77+
.. literalinclude:: /includes/fundamentals/code-snippets/builders/AggBuilders.java
78+
:start-after: // begin vectorSearch-output
79+
:end-before: // end vectorSearch-output
80+
:language: java
81+
:dedent:
82+
83+
.. tip:: Java Driver Vector Search Examples
84+
85+
Visit the :atlas:`Atlas documentation </atlas-vector-search/tutorials/>`
86+
to find more tutorials on using the {+driver-short+} to perform Atlas
87+
Vector Searches.
88+
89+
API Documentation
90+
-----------------
91+
92+
To learn more about the methods and types mentioned in this
93+
guide, see the following API documentation:
94+
95+
- `Aggregates.vectorSearch()
96+
<{+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)>`__
97+
98+
- `FieldSearchPath
99+
<{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/search/FieldSearchPath.html>`__
100+
101+
- `VectorSearchOptions
102+
<{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/search/VectorSearchOptions.html>`__
103+
104+
- `Projections.metaVectorSearchScore()
105+
<{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Projections.html#metaVectorSearchScore(java.lang.String)>`__
106+
107+
- `BinaryVector <{+api+}/apidocs/bson/org/bson/BinaryVector.html>`__

source/fundamentals/builders.txt renamed to source/builders.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Builders
88

99
.. toctree::
1010

11-
Aggregation </fundamentals/builders/aggregates>
12-
Filters </fundamentals/builders/filters>
13-
Indexes </fundamentals/builders/indexes>
14-
Projection </fundamentals/builders/projections>
15-
Sort </fundamentals/builders/sort>
16-
Update </fundamentals/builders/updates>
11+
Aggregation </builders/aggregates>
12+
Filters </builders/filters>
13+
Indexes </builders/indexes>
14+
Projection </builders/projections>
15+
Sort </builders/sort>
16+
Update </builders/updates>
1717

1818
.. contents:: On this page
1919
:local:

source/fundamentals/builders/aggregates.txt renamed to source/builders/aggregates.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Aggregates Builders
1515
:depth: 2
1616
:class: singlecol
1717

18+
.. toctree::
19+
20+
Atlas Vector Search </builders/vector-search>
21+
1822
.. _aggregates-builders:
1923

2024
Overview
@@ -86,7 +90,7 @@ Project
8690

8791
Use the ``project()`` method to create a :manual:`$project </reference/operator/aggregation/project/>`
8892
pipeline stage that project specified document fields. Field projection
89-
in aggregation follows the same rules as :doc:`field projection in queries </fundamentals/crud/read-operations/project>`.
93+
in aggregation follows the same rules as :doc:`field projection in queries </crud/read-operations/project>`.
9094

9195
.. tip::
9296

source/fundamentals/builders/filters.txt renamed to source/builders/filters.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In this guide, you can learn how to use **builders** to specify
2020

2121
Builders are classes provided by the MongoDB Java driver that help you
2222
construct :ref:`BSON <bson>` objects. To learn more, see our :doc:`guide
23-
on builders </fundamentals/builders/>`.
23+
on builders </builders/>`.
2424

2525
Filters are the operations MongoDB uses to limit your results to what
2626
you want to see.

0 commit comments

Comments
 (0)