Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 107b07d

Browse filesBrowse files
author
Joan Fontanals
authored
Merge branch 'main' into dependabot/pip/aiohttp-3.9.4
2 parents e0b9da9 + f5c9ab0 commit 107b07d
Copy full SHA for 107b07d

File tree

Expand file treeCollapse file tree

18 files changed

+1748
-6
lines changed
Filter options
Expand file treeCollapse file tree

18 files changed

+1748
-6
lines changed

‎.pre-commit-config.yaml

Copy file name to clipboardExpand all lines: .pre-commit-config.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
exclude: ^(docarray/proto/pb/docarray_pb2.py|docarray/proto/pb/docarray_pb2.py|docs/|docarray/resources/)
2222

2323
- repo: https://github.com/charliermarsh/ruff-pre-commit
24-
rev: v0.0.243
24+
rev: v0.0.250
2525
hooks:
2626
- id: ruff
2727

‎README.md

Copy file name to clipboardExpand all lines: README.md
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ DocArray is a Python library expertly crafted for the [representation](#represen
2222

2323
- :fire: Offers native support for **[NumPy](https://github.com/numpy/numpy)**, **[PyTorch](https://github.com/pytorch/pytorch)**, **[TensorFlow](https://github.com/tensorflow/tensorflow)**, and **[JAX](https://github.com/google/jax)**, catering specifically to **model training scenarios**.
2424
- :zap: Based on **[Pydantic](https://github.com/pydantic/pydantic)**, and instantly compatible with web and microservice frameworks like **[FastAPI](https://github.com/tiangolo/fastapi/)** and **[Jina](https://github.com/jina-ai/jina/)**.
25-
- :package: Provides support for vector databases such as **[Weaviate](https://weaviate.io/), [Qdrant](https://qdrant.tech/), [ElasticSearch](https://www.elastic.co/de/elasticsearch/), [Redis](https://redis.io/)**, and **[HNSWLib](https://github.com/nmslib/hnswlib)**.
25+
- :package: Provides support for vector databases such as **[Weaviate](https://weaviate.io/), [Qdrant](https://qdrant.tech/), [ElasticSearch](https://www.elastic.co/de/elasticsearch/), **[Redis](https://redis.io/)**, **[Mongo Atlas](https://www.mongodb.com/)**, and **[HNSWLib](https://github.com/nmslib/hnswlib)**.
2626
- :chains: Allows data transmission as JSON over **HTTP** or as **[Protobuf](https://protobuf.dev/)** over **[gRPC](https://grpc.io/)**.
2727

2828
## Installation
@@ -350,7 +350,7 @@ This is useful for:
350350
- :mag: **Neural search** applications
351351
- :bulb: **Recommender systems**
352352

353-
Currently, Document Indexes support **[Weaviate](https://weaviate.io/)**, **[Qdrant](https://qdrant.tech/)**, **[ElasticSearch](https://www.elastic.co/)**, **[Redis](https://redis.io/)**, and **[HNSWLib](https://github.com/nmslib/hnswlib)**, with more to come!
353+
Currently, Document Indexes support **[Weaviate](https://weaviate.io/)**, **[Qdrant](https://qdrant.tech/)**, **[ElasticSearch](https://www.elastic.co/)**, **[Redis](https://redis.io/)**, **[Mongo Atlas](https://www.mongodb.com/)**, and **[HNSWLib](https://github.com/nmslib/hnswlib)**, with more to come!
354354

355355
The Document Index interface lets you index and retrieve Documents from multiple vector databases, all with the same user interface.
356356

@@ -421,7 +421,7 @@ They are now called **Document Indexes** and offer the following improvements (s
421421
- **Production-ready:** The new Document Indexes are a much thinner wrapper around the various vector DB libraries, making them more robust and easier to maintain
422422
- **Increased flexibility:** We strive to support any configuration or setting that you could perform through the DB's first-party client
423423

424-
For now, Document Indexes support **[Weaviate](https://weaviate.io/)**, **[Qdrant](https://qdrant.tech/)**, **[ElasticSearch](https://www.elastic.co/)**, **[Redis](https://redis.io/)**, Exact Nearest Neighbour search and **[HNSWLib](https://github.com/nmslib/hnswlib)**, with more to come.
424+
For now, Document Indexes support **[Weaviate](https://weaviate.io/)**, **[Qdrant](https://qdrant.tech/)**, **[ElasticSearch](https://www.elastic.co/)**, **[Redis](https://redis.io/)**, **[Mongo Atlas](https://www.mongodb.com/)**, Exact Nearest Neighbour search and **[HNSWLib](https://github.com/nmslib/hnswlib)**, with more to come.
425425

426426
</details>
427427

@@ -844,6 +844,7 @@ Currently, DocArray supports the following vector databases:
844844
- [Milvus](https://milvus.io)
845845
- ExactNNMemorySearch as a local alternative with exact kNN search.
846846
- [HNSWlib](https://github.com/nmslib/hnswlib) as a local-first ANN alternative
847+
- [Mongo Atlas](https://www.mongodb.com/)
847848

848849
An integration of [OpenSearch](https://opensearch.org/) is currently in progress.
849850

@@ -874,6 +875,7 @@ from langchain.embeddings.openai import OpenAIEmbeddings
874875

875876
embeddings = OpenAIEmbeddings()
876877

878+
877879
# Define a document schema
878880
class MovieDoc(BaseDoc):
879881
title: str
@@ -903,6 +905,7 @@ from docarray.index import (
903905
QdrantDocumentIndex,
904906
ElasticDocIndex,
905907
RedisDocumentIndex,
908+
MongoDBAtlasDocumentIndex,
906909
)
907910

908911
# Select a suitable backend and initialize it with data

‎docarray/index/__init__.py

Copy file name to clipboardExpand all lines: docarray/index/__init__.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
from docarray.index.backends.epsilla import EpsillaDocumentIndex # noqa: F401
1414
from docarray.index.backends.hnswlib import HnswDocumentIndex # noqa: F401
1515
from docarray.index.backends.milvus import MilvusDocumentIndex # noqa: F401
16+
from docarray.index.backends.mongodb_atlas import ( # noqa: F401
17+
MongoDBAtlasDocumentIndex,
18+
)
1619
from docarray.index.backends.qdrant import QdrantDocumentIndex # noqa: F401
1720
from docarray.index.backends.redis import RedisDocumentIndex # noqa: F401
1821
from docarray.index.backends.weaviate import WeaviateDocumentIndex # noqa: F401
@@ -26,6 +29,7 @@
2629
'WeaviateDocumentIndex',
2730
'RedisDocumentIndex',
2831
'MilvusDocumentIndex',
32+
'MongoDBAtlasDocumentIndex',
2933
]
3034

3135

@@ -55,6 +59,9 @@ def __getattr__(name: str):
5559
elif name == 'RedisDocumentIndex':
5660
import_library('redis', raise_error=True)
5761
import docarray.index.backends.redis as lib
62+
elif name == 'MongoDBAtlasDocumentIndex':
63+
import_library('pymongo', raise_error=True)
64+
import docarray.index.backends.mongodb_atlas as lib
5865
else:
5966
raise ImportError(
6067
f'cannot import name \'{name}\' from \'{_get_path_from_docarray_root_level(__file__)}\''

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.