DOCSP-48420: bson v2.14 vector support#169
Conversation
✅ Deploy Preview for docs-rust ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
lindseymoore
left a comment
There was a problem hiding this comment.
A few questions and suggestions, thanks!
| * - ``filter`` | ||
| - document | ||
| - Specifies a pre-filter for documents to search on | ||
| - No filtering |
There was a problem hiding this comment.
| - No filtering | |
| - ``null`` (No filtering) |
S: Is there a default value you can list along with the default value behavior?
There was a problem hiding this comment.
This came from the Atlas docs, which didn't supply default values. I'm not sure null is actually the type interpreted by the server
There was a problem hiding this comment.
Could be worth asking the tech reviewer for the default value/clarification
There was a problem hiding this comment.
I'd leave these as-is; I'm not sure how the server represents these values when they're unset, but that shouldn't be of concern to the user and I think this phrasing better represents the actual behavior. There's no default value from the driver's perspective because the driver just sends the pipeline the user provided directly to the server.
| - number | ||
| - Specifies the number of nearest neighbors to use during the | ||
| search | ||
| - No limit |
There was a problem hiding this comment.
Same as above, is there a default value you can list?
There was a problem hiding this comment.
Would ask tech reviewer
| at the ``crates.io`` crate registry. | ||
|
|
||
| By implementing functionality from the ``serde`` crate into your | ||
| application, you can use custom Rust types such as structs and enums |
There was a problem hiding this comment.
| application, you can use custom Rust types such as structs and enums | |
| application, you can use custom Rust types such as ``structs`` and ``enums`` |
S: Should this be monospaced since they're types?
There was a problem hiding this comment.
I think they are regular nouns and other docs do not monospace them:
| By implementing functionality from the ``serde`` crate into your | ||
| application, you can use custom Rust types such as structs and enums | ||
| to model your data. | ||
| to model your data and Rust data types to model your field values. |
There was a problem hiding this comment.
Q: I'm confused by this. What is the difference between data and field values? Can you make a clearer distinction?
There was a problem hiding this comment.
I meant that you can use a struct to model a whole document and select Rust data types for each field value - will revert back to old wording if this is already clear
| .. note:: Query Vector Length | ||
|
|
||
| For demonstrative purposes, the examples in this section use | ||
| sample query vectors that contain very few elements, compared to | ||
| the query vector you might use in a runnable application. To view an | ||
| example that contains the full-length query vector, see the | ||
| :atlas:`Atlas Vector Search Quick Start </atlas-vector-search/tutorials/vector-search-quick-start/>` | ||
| and select :guilabel:`Rust` from the :guilabel:`Select your language` dropdown in the upper-right | ||
| corner of the page. |
There was a problem hiding this comment.
Q: Is the example still runnable without the correct query vector? If not, the output might be misleading.
There was a problem hiding this comment.
I'll add a code comment to direct users to replace the query vector
There was a problem hiding this comment.
S: I know it looks ugly to have the long vector, but it might be worth adding it to the page rather than including a note explaining why you didn't include and how to get the longer vector. I'll leave up to your discretion!
| .. list-table:: | ||
| :header-rows: 1 |
There was a problem hiding this comment.
| .. list-table:: | |
| :header-rows: 1 | |
| .. list-table:: | |
| :widths: 20 20 40 20 | |
| :header-rows: 1 |
S: Edit column widths, so "document" doesn't wrap
|
|
||
| To learn more about these parameters, see the :atlas:`Fields | ||
| </atlas-vector-search/vector-search-stage/#fields>` section of the | ||
| ``$vectorSearch`` operator reference in the Atlas documentation. |
There was a problem hiding this comment.
Should you include an Additional Information section with API refs?
lindseymoore
left a comment
There was a problem hiding this comment.
A few comments, otherwise LGTM! Let me know if you have any questions
| For demonstrative purposes, the examples in this section use | ||
| sample query vectors that contain very few elements, compared to | ||
| the query vector you use in a runnable application. |
There was a problem hiding this comment.
| For demonstrative purposes, the examples in this section use | |
| sample query vectors that contain very few elements, compared to | |
| the query vector you use in a runnable application. | |
| For demonstrative purposes, the example ``query_vector`` in this section | |
| contains very few elements, compared to | |
| the query vector you might use in a runnable application. |
S: Just to make it clear what example vector you are referring to
There was a problem hiding this comment.
using the full query vector so removing this admonition
isabelatkinson
left a comment
There was a problem hiding this comment.
small formatting suggestion, otherwise looks good!
| "queryVector": &query_vector, | ||
| "path": "plot_embedding", | ||
| "numCandidates": 150, | ||
| "index": "vector_index", | ||
| "limit": 5 | ||
| } |
There was a problem hiding this comment.
suggest indenting these lines for better readability
There was a problem hiding this comment.
I ran rustfmt and this was the indentation that was implemented - should I add an extra indent?
| "queryVector": &query_vector, | ||
| "path": "plot_embedding", | ||
| "numCandidates": 150, | ||
| "index": "vector_index", | ||
| "limit": 5 | ||
| } |
(cherry picked from commit aeb0adc)
(cherry picked from commit aeb0adc)
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-48420
Staging:
Self-Review Checklist