Skip to content

Commit 23455b8

Browse files
committed
LM PR fixes 1
1 parent ce9186f commit 23455b8

File tree

6 files changed

+55
-8
lines changed

6 files changed

+55
-8
lines changed

source/api.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=================
2+
API Documentation
3+
=================
4+
5+
.. toctree::
6+
:titlesonly:
7+
:maxdepth: 1
8+
9+
{+driver-long+} <{+api+}/index.html>
10+
BSON Crate <{+bson-api+}/index.html>
11+
12+
- `{+driver-long+} <{+api+}/index.html>`__
13+
- `BSON Crate <{+bson-api+}/index.html>`__

source/fundamentals/aggregation/vector-search.txt

+32-4
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,13 @@ tutorial in the Atlas documentation.
9999

100100
For demonstrative purposes, the examples in this section use
101101
sample query vectors that contain very few elements, compared to
102-
the query vector you might use in a runnable application. To view an
103-
example that contains the full-length query vector, see the
102+
the query vector you use in a runnable application.
103+
104+
To view an example that contains the full-length query vector, see the
104105
:atlas:`Atlas Vector Search Quick Start </atlas-vector-search/tutorials/vector-search-quick-start/>`
105-
and select :guilabel:`Rust` from the :guilabel:`Select your language` dropdown in the upper-right
106-
corner of the page.
106+
and select :guilabel:`Rust` from the :guilabel:`Select your language`
107+
dropdown in the upper-right corner of the page. Then, copy the query
108+
vector and replace the vector in the following examples.
107109

108110
Basic Vector Search Query
109111
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -173,6 +175,7 @@ Vector Search queries. Depending on your desired query, you can specify the
173175
following options in the stage definition:
174176

175177
.. list-table::
178+
:widths: 20 20 40 20
176179
:header-rows: 1
177180

178181
* - Optional Parameter
@@ -200,3 +203,28 @@ following options in the stage definition:
200203
To learn more about these parameters, see the :atlas:`Fields
201204
</atlas-vector-search/vector-search-stage/#fields>` section of the
202205
``$vectorSearch`` operator reference in the Atlas documentation.
206+
207+
.. _rust-avs-addtl-info:
208+
209+
Additional Information
210+
----------------------
211+
212+
To learn more about the concepts mentioned in this guide, see the
213+
following Server manual entries:
214+
215+
- :atlas:`Run Vector Search Queries </atlas-vector-search/vector-search-stage/>`
216+
- :manual:`Aggregation Pipeline </core/aggregation-pipeline/>`
217+
- :manual:`Aggregation Stages </meta/aggregation-quick-reference/#stages>`
218+
219+
To learn more about the behavior of the ``aggregate()`` method, see the
220+
:ref:`Aggregation Operations <rust-retrieve-aggregation>` section of the
221+
Retrieve Data guide.
222+
223+
API Documentation
224+
~~~~~~~~~~~~~~~~~
225+
226+
To learn more about the methods and types mentioned in this
227+
guide, see the following API documentation:
228+
229+
- `aggregate() <{+api+}/struct.Collection.html#method.aggregate>`__
230+
- `Vector <{+bson-api+}/binary/enum.Vector.html>`__

source/fundamentals/crud/read-operations/retrieve.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ following documentation:
394394
- :ref:`rust-sort-guide` guide
395395
- :ref:`rust-skip-guide` guide
396396
- :ref:`rust-limit-guide` guide
397+
397398
.. - :ref:`rust-project-guide`
398399
.. - :ref:`rust-collations-guide`
399400

@@ -409,4 +410,4 @@ guide, see the following API documentation:
409410
- `FindOneOptions <{+api+}/options/struct.FindOneOptions.html>`__
410411
- `Cursor <{+api+}/struct.Cursor.html>`__
411412
- `aggregate() <{+api+}/struct.Collection.html#method.aggregate>`__
412-
- `AggregateOptions <{+api+}/options/struct.AggregateOptions.html>`__
413+
- `AggregateOptions <{+api+}/options/struct.AggregateOptions.html>`__

source/fundamentals/serialization.txt

+5-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ from the **Serde framework**.
3131

3232
By implementing functionality from the ``serde`` crate into your
3333
application, you can use custom Rust types such as structs and enums
34-
to model your data and Rust data types to model your field values.
34+
to model your data.
3535

3636
This guide includes the following sections:
3737

@@ -93,7 +93,9 @@ the ``serde`` serialization traits:
9393
.. tip:: Vector Type
9494

9595
Starting in ``bson`` library v2.14, you can use the
96-
``bson::binary::Vector`` type to represent vectors of numeric values.
96+
`bson::binary::Vector <{+bson-api+}/binary/enum.Vector.html>`__ type
97+
to represent vectors of numeric values.
98+
9799
Since this type is serialized as a BSON binary vector, usage of
98100
``Vector`` can improve storage efficiency. To learn more, see the
99101
`BSON specification <https://bsonspec.org/spec.html>`__.
@@ -339,6 +341,7 @@ To learn more about the methods and types mentioned in this
339341
guide, see the following API documentation:
340342

341343
- `collection() <{+api+}/struct.Database.html#method.collection>`__
344+
- `Vector <{+bson-api+}/binary/enum.Vector.html>`__
342345
- `clone_with_type() <{+api+}/struct.Collection.html#method.clone_with_type>`__
343346
- `serialize_with <https://serde.rs/field-attrs.html#serialize_with>`__
344347
Serde attribute

source/includes/fundamentals/code-snippets/aggregation/vector-search.rs

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ async fn main() -> mongodb::error::Result<()> {
2323
.collection("embedded_movies");
2424

2525
// start-basic-query
26+
// Replace this query vector with the 1536-element vector in the
27+
// Atlas documentation example
2628
let query_vector = Vector::Float32(vec![-0.0016261312, -0.028070757, -0.011342932]);
2729
let pipeline = vec![
2830
doc! {

source/index.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
What's New </whats-new>
1212
CRUD Examples </usage-examples>
1313
Fundamentals </fundamentals>
14-
API Documentation <{+api+}/>
14+
API Documentation </api>
1515
FAQ </faq>
1616
Connection Troubleshooting </connection-troubleshooting>
1717
Operation Error Handling </op-error-handling>

0 commit comments

Comments
 (0)