diff --git a/config/redirects b/config/redirects index 9210fa9db..41ebcfd26 100644 --- a/config/redirects +++ b/config/redirects @@ -8,7 +8,7 @@ symlink: upcoming -> master raw: ${prefix}/ -> ${base}/current/ raw: ${prefix}/master -> ${base}/upcoming/ -[*-master]: ${prefix}/${version}/fundamentals/versioned-api/ -> ${base}/${version}/fundamentals/stable-api/ +[*-v5.2]: ${prefix}/${version}/fundamentals/versioned-api/ -> ${base}/${version}/fundamentals/stable-api/ [*-v4.6]: ${prefix}/${version}/fundamentals/crud/read-operations/change-streams/ -> ${base}/${version}/fundamentals/crud/read-operations/retrieve/ [*-master]: ${prefix}/${version}/fundamentals/csfle/ -> ${base}/${version}/fundamentals/encrypt-fields/ [*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/change-a-document/ -> ${base}/${version}/fundamentals/crud/write-operations/modify/ @@ -50,3 +50,25 @@ raw: ${prefix}/master -> ${base}/upcoming/ [v5.3-master]: ${prefix}/${version}/fundamentals/connection/socks/ -> ${base}/${version}/connection/socks/ [v5.3-master]: ${prefix}/${version}/fundamentals/connection/tls/ -> ${base}/${version}/security/tls/ [v5.3-master]: ${prefix}/${version}/fundamentals/connection/jndi/ -> ${base}/${version}/connection/jndi/ +[v5.3-master]: ${prefix}/${version}/fundamentals/builders/ -> ${base}/${version}/crud/builders/ +[v5.3-master]: ${prefix}/${version}/fundamentals/builders/aggregates/ -> ${base}/${version}/crud/builders/aggregates/ +[v5.3-master]: ${prefix}/${version}/fundamentals/builders/filters/ -> ${base}/${version}/crud/builders/filters/ +[v5.3-master]: ${prefix}/${version}/fundamentals/builders/indexes/ -> ${base}/${version}/crud/builders/indexes/ +[v5.3-master]: ${prefix}/${version}/fundamentals/builders/projections/ -> ${base}/${version}/crud/builders/projections/ +[v5.3-master]: ${prefix}/${version}/fundamentals/builders/sort/ -> ${base}/${version}/crud/builders/sort/ +[v5.3-master]: ${prefix}/${version}/fundamentals/builders/updates/ -> ${base}/${version}/crud/builders/updates/ +[v5.3-master]: ${prefix}/${version}/fundamentals/builders/vector-search -> ${base}/${version}/atlas-vector-search/ +[v5.3-master]: ${prefix}/${version}/fundamentals/aggregation/ -> ${base}/${version}/crud/aggregation/ +[v5.3-master]: ${prefix}/${version}/fundamentals/aggregation-expression-operations/ -> ${base}/${version}/crud/aggregation-expression-operations/ +[v5.3-master]: ${prefix}/${version}/fundamentals/collations/ -> ${base}/${version}/crud/collations/ +[v5.3-master]: ${prefix}/${version}/fundamentals/stable-api/ -> ${base}/${version}/connection/stable-api/ +[v5.3-master]: ${prefix}/${version}/connection-troubleshooting/ -> ${base}/${version}/connection/connection-troubleshooting/ +[v5.3-master]: ${prefix}/${version}/fundamentals/gridfs/ -> ${base}/${version}/crud/gridfs/ +[v5.3-master]: ${prefix}/${version}/fundamentals/transactions/ -> ${base}/${version}/crud/transactions/ +[v5.3-master]: ${prefix}/${version}/fundamentals/time-series/ -> ${base}/${version}/data-formats/time-series/ +[v5.3-master]: ${prefix}/${version}/quick-start/ -> ${base}/${version}/getting-started/ +[v5.3-master]: ${prefix}/${version}/fundamentals/databases-collections/ -> ${base}/${version}/getting-started/databases-collections/ +[v5.3-master]: ${prefix}/${version}/integrations/ -> ${base}/${version}/getting-started/integrations/ +[v5.3-master]: ${prefix}/${version}/quick-reference/ -> ${base}/${version}/getting-started/quick-reference/ +[v5.3-master]: ${prefix}/${version}/fundamentals/enterprise-auth/ -> ${base}/${version}/security/enterprise-auth/ +[v5.3-master]: ${prefix}/${version}/connection/socks/ -> ${base}/${version}/security/socks/ diff --git a/snooty.toml b/snooty.toml index c2c675d7e..82b743182 100644 --- a/snooty.toml +++ b/snooty.toml @@ -7,12 +7,12 @@ intersphinx = [ ] toc_landing_pages = [ + "/getting-started", "/connection", "/crud", - "/fundamentals/builders", - "/fundamentals/aggregation", - "/usage-examples", - "/fundamentals/builders/aggregates", + "/crud/builders", + "/data-formats", + "/api-documentation" ] sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/" diff --git a/source/atlas-vector-search.txt b/source/atlas-vector-search.txt index 7cd53247e..e60a1d487 100644 --- a/source/atlas-vector-search.txt +++ b/source/atlas-vector-search.txt @@ -9,7 +9,7 @@ Atlas Vector Search :values: reference .. meta:: - :keywords: full text, text analyzer, meta, pipeline, scoring, Lucene, AI, artificial intelligence + :keywords: full text, text analyzer, meta, pipeline, scoring, Lucene, AI, artificial intelligence, code example, semantic, nearest :description: Learn about how to use Atlas Vector Search in the {+driver-long+}. .. contents:: On this page @@ -18,5 +18,90 @@ Atlas Vector Search :depth: 2 :class: singlecol -See :atlas:`Atlas Vector Search ` -in the MongoDB Atlas documentation. \ No newline at end of file +Overview +-------- + +In this guide, you can learn how to use the :atlas:`Atlas Vector Search +` feature +in the {+driver-short+}. The ``Aggregates`` builders class provides the +the ``vectorSearch()`` helper method that you can use to +create a :atlas:`$vectorSearch ` +pipeline stage. This pipeline stage allows you to perform a **semantic +search** on your documents. A semantic search is a type of search which +locates information that is similar in meaning, but not necessarily +identical, to your provided search term or phrase. + +.. important:: Feature Compatibility + + To learn what versions of MongoDB Atlas support this feature, see + :atlas:`Limitations ` + in the MongoDB Atlas documentation. + +Perform a Vector Search +----------------------- + +To use this feature, you must create a vector search index and index your +vector embeddings. To learn about how to programmatically create a +vector search index, see the :ref:`java-search-indexes` section in the +Indexes guide. To learn more about vector embeddings, see +:atlas:`How to Index Vector Embeddings for Vector Search +` in the Atlas documentation. + +After you create a vector search index on your vector embeddings, you +can reference this index in your pipeline stage, as shown in the +following section. + +Vector Search Example +~~~~~~~~~~~~~~~~~~~~~ + +The following example shows how to build an aggregation pipeline that uses the +``vectorSearch()`` and ``project()`` methods to compute a vector search score: + +.. literalinclude:: /includes/fundamentals/code-snippets/builders/AggBuilders.java + :start-after: // begin vectorSearch + :end-before: // end vectorSearch + :language: java + :dedent: + +.. tip:: Query Vector Type + + The preceding example creates an instance of ``BinaryVector`` to + serve as the query vector, but you can also create a ``List`` of + ``Double`` instances. However, we recommend that you use the + ``BinaryVector`` type to improve storage efficiency. + +The following example shows how you can run the aggregation and print +the vector search meta-score from the result of the preceding +aggregation pipeline: + +.. literalinclude:: /includes/fundamentals/code-snippets/builders/AggBuilders.java + :start-after: // begin vectorSearch-output + :end-before: // end vectorSearch-output + :language: java + :dedent: + +.. tip:: Java Driver Vector Search Examples + + Visit the :atlas:`Atlas documentation ` + to find more tutorials on using the {+driver-short+} to perform Atlas + Vector Searches. + +API Documentation +----------------- + +To learn more about the methods and types mentioned in this +guide, see the following API documentation: + +- `Aggregates.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,com.mongodb.client.model.search.VectorSearchOptions)>`__ + +- `FieldSearchPath + <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/search/FieldSearchPath.html>`__ + +- `VectorSearchOptions + <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/search/VectorSearchOptions.html>`__ + +- `Projections.metaVectorSearchScore() + <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Projections.html#metaVectorSearchScore(java.lang.String)>`__ + +- `BinaryVector <{+api+}/apidocs/bson/org/bson/BinaryVector.html>`__ \ No newline at end of file diff --git a/source/connection.txt b/source/connection.txt index ef4975990..d34dc63f2 100644 --- a/source/connection.txt +++ b/source/connection.txt @@ -9,9 +9,10 @@ Connection Guide Connect to MongoDB Connection Options MongoClient Settings + Stable API Network Compression - SOCKS5 Proxy JNDI Datasource + Connection Troubleshooting AWS Lambda .. contents:: On this page diff --git a/source/connection/connect.txt b/source/connection/connect.txt index 1a7579f45..c718c28f1 100644 --- a/source/connection/connect.txt +++ b/source/connection/connect.txt @@ -33,9 +33,7 @@ Use the ``MongoClients.create()`` method to construct a ``MongoClient``. As each ``MongoClient`` represents a thread-safe pool of connections to the database, most applications only require a single instance of a - ``MongoClient``, even across multiple threads. To learn more about - how connection pools work in the driver, see the :ref:`FAQ page `. - + ``MongoClient``, even across multiple threads. All resource usage limits, such as max connections, apply to individual ``MongoClient`` instances. diff --git a/source/connection-troubleshooting.txt b/source/connection/connection-troubleshooting.txt similarity index 97% rename from source/connection-troubleshooting.txt rename to source/connection/connection-troubleshooting.txt index b05ba4ce5..a4a79c6bd 100644 --- a/source/connection-troubleshooting.txt +++ b/source/connection/connection-troubleshooting.txt @@ -31,8 +31,6 @@ Connection Troubleshooting finding more resources - The `MongoDB Community Forums <{+communityForums+}>`__ for questions, discussions, or general technical support - - The :ref:`Frequently Asked Questions (FAQ) ` page for - answers to common questions about the {+driver-short+} .. replacement:: server-selection-timeout-error @@ -150,11 +148,6 @@ Connection Troubleshooting ``maxIdleTimeMS`` - .. replacement:: connection-pools-learn-more - - To learn more about how connection pooling works in the driver, see - :ref:`java-faq-connection-pool` in the FAQ. - .. replacement:: scram-failure-error .. code-block:: diff --git a/source/fundamentals/stable-api.txt b/source/connection/stable-api.txt similarity index 100% rename from source/fundamentals/stable-api.txt rename to source/connection/stable-api.txt diff --git a/source/crud.txt b/source/crud.txt index 55dded691..3fc0b0fde 100644 --- a/source/crud.txt +++ b/source/crud.txt @@ -11,6 +11,12 @@ CRUD Operations Write Query Compound Operations + Transactions + Builders + Aggregation + Aggregation Expressions + Collations + Large File Storage with GridFS CRUD (Create, Read, Update, Delete) operations enable you to work with data stored in MongoDB. diff --git a/source/fundamentals/aggregation-expression-operations.txt b/source/crud/aggregation-expression-operations.txt similarity index 100% rename from source/fundamentals/aggregation-expression-operations.txt rename to source/crud/aggregation-expression-operations.txt diff --git a/source/fundamentals/aggregation.txt b/source/crud/aggregation.txt similarity index 100% rename from source/fundamentals/aggregation.txt rename to source/crud/aggregation.txt diff --git a/source/fundamentals/builders.txt b/source/crud/builders.txt similarity index 92% rename from source/fundamentals/builders.txt rename to source/crud/builders.txt index 1311f8f74..eb906a6b4 100644 --- a/source/fundamentals/builders.txt +++ b/source/crud/builders.txt @@ -6,12 +6,12 @@ Builders .. toctree:: - Aggregation - Filters - Indexes - Projection - Sort - Update + Aggregation + Filters + Indexes + Projection + Sort + Update .. contents:: On this page :local: diff --git a/source/fundamentals/builders/aggregates.txt b/source/crud/builders/aggregates.txt similarity index 100% rename from source/fundamentals/builders/aggregates.txt rename to source/crud/builders/aggregates.txt diff --git a/source/fundamentals/builders/filters.txt b/source/crud/builders/filters.txt similarity index 100% rename from source/fundamentals/builders/filters.txt rename to source/crud/builders/filters.txt diff --git a/source/fundamentals/builders/indexes.txt b/source/crud/builders/indexes.txt similarity index 100% rename from source/fundamentals/builders/indexes.txt rename to source/crud/builders/indexes.txt diff --git a/source/fundamentals/builders/projections.txt b/source/crud/builders/projections.txt similarity index 100% rename from source/fundamentals/builders/projections.txt rename to source/crud/builders/projections.txt diff --git a/source/fundamentals/builders/sort.txt b/source/crud/builders/sort.txt similarity index 100% rename from source/fundamentals/builders/sort.txt rename to source/crud/builders/sort.txt diff --git a/source/fundamentals/builders/updates.txt b/source/crud/builders/updates.txt similarity index 100% rename from source/fundamentals/builders/updates.txt rename to source/crud/builders/updates.txt diff --git a/source/fundamentals/collations.txt b/source/crud/collations.txt similarity index 100% rename from source/fundamentals/collations.txt rename to source/crud/collations.txt diff --git a/source/fundamentals/gridfs.txt b/source/crud/gridfs.txt similarity index 98% rename from source/fundamentals/gridfs.txt rename to source/crud/gridfs.txt index cc9f2bb73..72bbb3e7f 100644 --- a/source/fundamentals/gridfs.txt +++ b/source/crud/gridfs.txt @@ -1,8 +1,14 @@ -====== -GridFS -====== +============================== +Large File Storage with GridFS +============================== +.. facet:: + :name: genre + :values: reference +.. meta:: + :keywords: retrieve, size limit + :description: Store large files with GridFS in the {+driver-long+}. .. contents:: On this page :local: diff --git a/source/fundamentals/transactions.txt b/source/crud/transactions.txt similarity index 100% rename from source/fundamentals/transactions.txt rename to source/crud/transactions.txt diff --git a/source/data-formats.txt b/source/data-formats.txt index 2ef94ed67..f553fbc97 100644 --- a/source/data-formats.txt +++ b/source/data-formats.txt @@ -12,9 +12,10 @@ Data Formats Extended JSON Documents POJOs - Records POJO Customization + Records Codecs + Time Series Collections - :doc:`/data-formats/document-data-format-bson` - :doc:`/data-formats/document-data-format-extended-json` diff --git a/source/fundamentals/time-series.txt b/source/data-formats/time-series.txt similarity index 100% rename from source/fundamentals/time-series.txt rename to source/data-formats/time-series.txt diff --git a/source/fundamentals/builders/vector-search.txt b/source/fundamentals/builders/vector-search.txt deleted file mode 100644 index 550763494..000000000 --- a/source/fundamentals/builders/vector-search.txt +++ /dev/null @@ -1,106 +0,0 @@ -.. _java-atlas-vector-search: - -=================== -Atlas Vector Search -=================== - -.. facet:: - :name: genre - :values: reference - -.. meta:: - :keywords: code example, semantic, nearest - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - -Overview --------- - -In this guide, you can learn how to use the :atlas:`Atlas Vector Search -` feature -in the {+driver-short+}. The ``Aggregates`` builders class provides the -the ``vectorSearch()`` helper method that you can use to -create a :atlas:`$vectorSearch ` -pipeline stage. This pipeline stage allows you to perform a **semantic -search** on your documents. A semantic search is a type of search which -locates information that is similar in meaning, but not necessarily -identical, to your provided search term or phrase. - -.. important:: Feature Compatibility - - To learn what versions of MongoDB Atlas support this feature, see - :atlas:`Limitations ` - in the MongoDB Atlas documentation. - -Perform a Vector Search ------------------------ - -To use this feature, you must create a vector search index and index your -vector embeddings. To learn about how to programmatically create a -vector search index, see the :ref:`java-search-indexes` section in the -Indexes guide. To learn more about vector embeddings, see -:atlas:`How to Index Vector Embeddings for Vector Search -` in the Atlas documentation. - -After you create a vector search index on your vector embeddings, you -can reference this index in your pipeline stage, as shown in the -following section. - -Vector Search Example -~~~~~~~~~~~~~~~~~~~~~ - -The following example shows how to build an aggregation pipeline that uses the -``vectorSearch()`` and ``project()`` methods to compute a vector search score: - -.. literalinclude:: /includes/fundamentals/code-snippets/builders/AggBuilders.java - :start-after: // begin vectorSearch - :end-before: // end vectorSearch - :language: java - :dedent: - -.. tip:: Query Vector Type - - The preceding example creates an instance of ``BinaryVector`` to - serve as the query vector, but you can also create a ``List`` of - ``Double`` instances. However, we recommend that you use the - ``BinaryVector`` type to improve storage efficiency. - -The following example shows how you can run the aggregation and print -the vector search meta-score from the result of the preceding -aggregation pipeline: - -.. literalinclude:: /includes/fundamentals/code-snippets/builders/AggBuilders.java - :start-after: // begin vectorSearch-output - :end-before: // end vectorSearch-output - :language: java - :dedent: - -.. tip:: Java Driver Vector Search Examples - - Visit the :atlas:`Atlas documentation ` - to find more tutorials on using the {+driver-short+} to perform Atlas - Vector Searches. - -API Documentation ------------------ - -To learn more about the methods and types mentioned in this -guide, see the following API documentation: - -- `Aggregates.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,com.mongodb.client.model.search.VectorSearchOptions)>`__ - -- `FieldSearchPath - <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/search/FieldSearchPath.html>`__ - -- `VectorSearchOptions - <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/search/VectorSearchOptions.html>`__ - -- `Projections.metaVectorSearchScore() - <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Projections.html#metaVectorSearchScore(java.lang.String)>`__ - -- `BinaryVector <{+api+}/apidocs/bson/org/bson/BinaryVector.html>`__ diff --git a/source/quick-start.txt b/source/getting-started.txt similarity index 94% rename from source/quick-start.txt rename to source/getting-started.txt index ee95b28b2..9120522de 100644 --- a/source/quick-start.txt +++ b/source/getting-started.txt @@ -1,8 +1,8 @@ .. _java-sync-quickstart: -======================= -Java Driver Quick Start -======================= +=============== +Getting Started +=============== .. facet:: :name: genre @@ -17,6 +17,14 @@ Java Driver Quick Start :depth: 2 :class: singlecol +.. toctree:: + :titlesonly: + :maxdepth: 1 + + Quick Reference + Databases and Collections + Integrations + Introduction ------------ diff --git a/source/fundamentals/databases-collections.txt b/source/getting-started/databases-collections.txt similarity index 100% rename from source/fundamentals/databases-collections.txt rename to source/getting-started/databases-collections.txt diff --git a/source/integrations.txt b/source/getting-started/integrations.txt similarity index 100% rename from source/integrations.txt rename to source/getting-started/integrations.txt diff --git a/source/quick-reference.txt b/source/getting-started/quick-reference.txt similarity index 100% rename from source/quick-reference.txt rename to source/getting-started/quick-reference.txt diff --git a/source/index.txt b/source/index.txt index 0521adbdb..4b6a19399 100644 --- a/source/index.txt +++ b/source/index.txt @@ -18,7 +18,7 @@ MongoDB Java Driver :titlesonly: :maxdepth: 1 - Getting Started + Getting Started Connect CRUD Operations Data Formats @@ -113,13 +113,6 @@ and links to the API documentation. * - `Legacy Java Driver <{+api+}/apidocs/mongodb-driver-legacy/index.html>`__ - Legacy API -FAQ ---- - -For answers to commonly asked questions about the MongoDB -Java Driver, see the :doc:`Frequently Asked Questions (FAQ) ` -section. - Connection Troubleshooting -------------------------- diff --git a/source/security.txt b/source/security.txt index f4bb3b42c..4414a7ffb 100644 --- a/source/security.txt +++ b/source/security.txt @@ -10,6 +10,8 @@ Security :maxdepth: 1 Authentication + Enterprise Authentication In-Use Encryption TLS/SSL + SOCKS5 Proxy Validate Driver Artifact Signatures \ No newline at end of file diff --git a/source/fundamentals/enterprise-auth.txt b/source/security/enterprise-auth.txt similarity index 100% rename from source/fundamentals/enterprise-auth.txt rename to source/security/enterprise-auth.txt diff --git a/source/connection/socks.txt b/source/security/socks.txt similarity index 100% rename from source/connection/socks.txt rename to source/security/socks.txt