Skip to content

Commit

Permalink
docs: Final API docs touches (#538)
Browse files Browse the repository at this point in the history
* Final API docs touches

* small fixes

* remove error from API ref: MongoDBAtlasDocumentStoreError is never used

---------

Co-authored-by: Stefano Fiorucci <[email protected]>
  • Loading branch information
vblagoje and anakin87 authored Mar 6, 2024
1 parent d4a2ed5 commit 5a339d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions integrations/mongodb_atlas/pydoc/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ loaders:
modules: [
"haystack_integrations.document_stores.mongodb_atlas.document_store",
"haystack_integrations.document_stores.mongodb_atlas.filters",
"haystack_integrations.components.retrievers.mongodb_atlas.embedding_retriever",
]
ignore_when_discovered: ["__init__"]
processors:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

class MongoDBAtlasDocumentStore:
"""
MongoDBAtlasDocumentStore is a DocumentStore implementation that uses [MongoDB Atlas](https://www.mongodb.com/atlas/database).
service that is easy to deploy, operate, and scale.
MongoDBAtlasDocumentStore is a DocumentStore implementation that uses
[MongoDB Atlas](https://www.mongodb.com/atlas/database) service that is easy to deploy, operate, and scale.
To connect to MongoDB Atlas, you need to provide a connection string in the format:
"mongodb+srv://{mongo_atlas_username}:{mongo_atlas_password}@{mongo_atlas_host}/?{mongo_atlas_params_string}".
`"mongodb+srv://{mongo_atlas_username}:{mongo_atlas_password}@{mongo_atlas_host}/?{mongo_atlas_params_string}"`.
This connection string can be obtained on the MongoDB Atlas Dashboard by clicking on the `CONNECT` button, selecting
Python as the driver, and copying the connection string. The connection string can be provided as an environment
Expand All @@ -39,7 +39,7 @@ class MongoDBAtlasDocumentStore:
can support a chosen metric (i.e. cosine, dot product, or euclidean) and can be created in the Atlas web UI.
For more details on MongoDB Atlas, see the official
MongoDB Atlas [documentation](https://www.mongodb.com/docs/atlas/getting-started/)
MongoDB Atlas [documentation](https://www.mongodb.com/docs/atlas/getting-started/).
Usage example:
```python
Expand All @@ -64,7 +64,7 @@ def __init__(
Creates a new MongoDBAtlasDocumentStore instance.
:param mongo_connection_string: MongoDB Atlas connection string in the format:
"mongodb+srv://{mongo_atlas_username}:{mongo_atlas_password}@{mongo_atlas_host}/?{mongo_atlas_params_string}".
`"mongodb+srv://{mongo_atlas_username}:{mongo_atlas_password}@{mongo_atlas_host}/?{mongo_atlas_params_string}"`.
This can be obtained on the MongoDB Atlas Dashboard by clicking on the `CONNECT` button.
This value will be read automatically from the env var "MONGO_CONNECTION_STRING".
:param database_name: Name of the database to use.
Expand All @@ -73,7 +73,7 @@ def __init__(
:param vector_search_index: The name of the vector search index to use for vector search operations.
Create a vector_search_index in the Atlas web UI and specify the init params of MongoDBAtlasDocumentStore. \
For more details refer to MongoDB
Atlas [documentation](https://www.mongodb.com/docs/atlas/atlas-vector-search/create-index/#std-label-avs-create-index)
Atlas [documentation](https://www.mongodb.com/docs/atlas/atlas-vector-search/create-index/#std-label-avs-create-index).
:raises ValueError: If the collection name contains invalid characters.
"""
Expand Down

0 comments on commit 5a339d4

Please sign in to comment.