implementation that runs fully locally and is best suited for small- to medium-sized datasets. It stores vectors on disk in hnswlib, and stores all other data in SQLite.Learn more here: https://docs.docarray.org/user_guide/storing/index_hnswlib/from docarray.index import HnswDocumentIndex# initialize the indexdb = HnswDocumentIndex[MyDoc](work_dir="hnsw_index")# index datadb.index(    [        MyDoc(            title=f"My document {i}",            title_embedding=embeddings.embed_query(f"query {i}"),            year=i,            color=random.choice(["red", "green", "blue"]),        )        for i in range(100)    ])# optionally, you can create a filter queryfilter_query = {"year": {"$lte": 90}}# create a retrieverretriever = DocArrayRetriever(    index=db,    embeddings=embeddings,    search_field="title_embedding",    content_field="title",    filters=filter_query,)# find the relevant documentdoc = retriever.get_relevant_documents("some query")print(doc)    [Document(page_content='My document 28', metadata={'id': 'ca9f3f4268eec7c97a7d6e77f541cb82', 'year': 28, 'color': 'red'})]WeaviateDocumentIndex‚ÄãWeaviateDocumentIndex is a document index that is built upon Weaviate vector database.Learn more here: https://docs.docarray.org/user_guide/storing/index_weaviate/# There's a small difference with the Weaviate backend compared to the others.# Here, you need to 'mark' the field used for vector search with 'is_embedding=True'.# So, let's create a new schema for Weaviate that takes care of this requirement.from pydantic import Fieldclass WeaviateDoc(BaseDoc):    title: str    title_embedding: NdArray[32] = Field(is_embedding=True)    year: int    color: strfrom docarray.index import WeaviateDocumentIndex# initialize the indexdbconfig = WeaviateDocumentIndex.DBConfig(host="http://localhost:8080")db = WeaviateDocumentIndex[WeaviateDoc](db_config=dbconfig)# index datadb.index(    [        MyDoc(            title=f"My document {i}",
DocArray is a versatile, open-source tool for managing your multi-modal data. It lets you shape your data however you want, and offers the flexibility to store and search it using various document index backends. Plus, it gets even better - you can utilize your DocArray document index to create a DocArrayRetriever, and build awesome Langchain apps!
DocArray is a versatile, open-source tool for managing your multi-modal data. It lets you shape your data however you want, and offers the flexibility to store and search it using various document index backends. Plus, it gets even better - you can utilize your DocArray document index to create a DocArrayRetriever, and build awesome Langchain apps! ->: implementation that runs fully locally and is best suited for small- to medium-sized datasets. It stores vectors on disk in hnswlib, and stores all other data in SQLite.Learn more here: https://docs.docarray.org/user_guide/storing/index_hnswlib/from docarray.index import HnswDocumentIndex# initialize the indexdb = HnswDocumentIndex[MyDoc](work_dir="hnsw_index")# index datadb.index(    [        MyDoc(            title=f"My document {i}",            title_embedding=embeddings.embed_query(f"query {i}"),            year=i,            color=random.choice(["red", "green", "blue"]),        )        for i in range(100)    ])# optionally, you can create a filter queryfilter_query = {"year": {"$lte": 90}}# create a retrieverretriever = DocArrayRetriever(    index=db,    embeddings=embeddings,    search_field="title_embedding",    content_field="title",    filters=filter_query,)# find the relevant documentdoc = retriever.get_relevant_documents("some query")print(doc)    [Document(page_content='My document 28', metadata={'id': 'ca9f3f4268eec7c97a7d6e77f541cb82', 'year': 28, 'color': 'red'})]WeaviateDocumentIndex‚ÄãWeaviateDocumentIndex is a document index that is built upon Weaviate vector database.Learn more here: https://docs.docarray.org/user_guide/storing/index_weaviate/# There's a small difference with the Weaviate backend compared to the others.# Here, you need to 'mark' the field used for vector search with 'is_embedding=True'.# So, let's create a new schema for Weaviate that takes care of this requirement.from pydantic import Fieldclass WeaviateDoc(BaseDoc):    title: str    title_embedding: NdArray[32] = Field(is_embedding=True)    year: int    color: strfrom docarray.index import WeaviateDocumentIndex# initialize the indexdbconfig = WeaviateDocumentIndex.DBConfig(host="http://localhost:8080")db = WeaviateDocumentIndex[WeaviateDoc](db_config=dbconfig)# index datadb.index(    [        MyDoc(            title=f"My document {i}",