Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

Commit 3fc6ecb

Browse files
authored
chore: fix docarray v1v2 terms (#1668)
Signed-off-by: Han Xiao <han.xiao@jina.ai>
1 parent a764341 commit 3fc6ecb

13 files changed

Lines changed: 103 additions & 86 deletions

File tree

.github/ISSUE_TEMPLATE/bug-v1-deprecated.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 🐛 DocArray V1 Bug (0.1.0 - 0.20.1) (Deprecated Version)
1+
name: 🐛 DocArray <=0.21 Bug (0.1.0 - 0.20.1) (Deprecated Version)
22
description: Report a bug or unexpected behavior in DocArray version prior to v2 (0.21.1)
33
labels: [bug V1, unconfirmed]
44

README.md

Lines changed: 73 additions & 72 deletions
Large diffs are not rendered by default.

docarray/array/doc_list/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def _stream_header(self) -> bytes:
555555
# Binary format for streaming case
556556

557557
# V2 DocList streaming serialization format
558-
# | 1 byte | 8 bytes | 4 bytes | variable(docarray v2) | 4 bytes | variable(docarray v2) ...
558+
# | 1 byte | 8 bytes | 4 bytes | variable(DocArray >=0.30) | 4 bytes | variable(DocArray >=0.30) ...
559559

560560
# 1 byte (uint8)
561561
version_byte = b'\x02'

docarray/documents/legacy/legacy_document.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
class LegacyDocument(BaseDoc):
1010
"""
11-
This Document is the LegacyDocument. It follows the same schema as in DocArray v1.
11+
This Document is the LegacyDocument. It follows the same schema as in DocArray <=0.21.
1212
It can be useful to start migrating a codebase from v1 to v2.
1313
14-
Nevertheless, the API is not totally compatible with DocArray v1 `Document`.
14+
Nevertheless, the API is not totally compatible with DocArray <=0.21 `Document`.
1515
Indeed, none of the method associated with `Document` are present. Only the schema
1616
of the data is similar.
1717

docs/assets/docarray-colorful.svg

Lines changed: 16 additions & 0 deletions
Loading

docs/assets/docarray-dark.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/how_to/add_doc_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ When indexing documents, your implementation should behave in the following way:
384384
- Every field in the Document is mapped to a column in the database
385385
- This includes the `id` field, which is mapped to the primary key of the database (if your backend has such a concept)
386386
- The configuration of that column can be found in `self._column_infos[field_name].config`
387-
- In DocArray v1, we used to store a serialized representation of every document. This is not needed anymore, as every row in your database table should fully represent a single indexed document.
387+
- In DocArray <=0.21, we used to store a serialized representation of every document. This is not needed anymore, as every row in your database table should fully represent a single indexed document.
388388

389389
To handle nested documents, the public `index()` method already flattens every incoming document for you.
390390
This means that `_index()` already receives a flattened representation of the data, and you don't need to worry about that.

docs/migration_guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
If you are using DocArray v<0.30.0, you will be familiar with its [dataclass API](https://docarray.jina.ai/fundamentals/dataclass/).
44

5-
_DocArray v2 is that idea, taken seriously._ Every document is created through a dataclass-like interface,
5+
_DocArray >=0.30 is that idea, taken seriously._ Every document is created through a dataclass-like interface,
66
courtesy of [Pydantic](https://pydantic-docs.helpmanual.io/usage/models/).
77

88
This gives the following advantages:
@@ -33,7 +33,7 @@ and additional `chunks` and `matches`.
3333
- In v2 we have the [`LegacyDocument`][docarray.documents.legacy.LegacyDocument] class,
3434
which extends `BaseDoc` while following the same schema as v1's `Document`.
3535
The `LegacyDocument` can be useful to start migrating your codebase from v1 to v2.
36-
Nevertheless, the API is not fully compatible with DocArray v1 `Document`.
36+
Nevertheless, the API is not fully compatible with DocArray <=0.21 `Document`.
3737
Indeed, none of the methods associated with `Document` are present.
3838
Only the schema of the data is similar.
3939

@@ -100,7 +100,7 @@ book_titles = docs.title # returns a list[str]
100100
## Changes to Document Store
101101

102102
In v2 the `Document Store` has been renamed to [`DocIndex`](user_guide/storing/docindex.md) and can be used for fast retrieval using vector similarity.
103-
DocArray v2 `DocIndex` supports:
103+
DocArray >=0.30 `DocIndex` supports:
104104

105105
- [Weaviate](https://weaviate.io/)
106106
- [Qdrant](https://qdrant.tech/)

docs/user_guide/representing/array.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Array of documents
22

3-
DocArray allows users to represent and manipulate multi-modal data to build AI applications such as neural search and generative AI.
3+
DocArray allows users to represent and manipulate multimodal data to build AI applications such as neural search and generative AI.
44

55
As you have seen in the [previous section](array.md), the fundamental building block of DocArray is the [`BaseDoc`][docarray.base_doc.doc.BaseDoc] class which represents a *single* document, a *single* datapoint.
66

docs/user_guide/sending/api/jina.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ In this example we'll build an audio-to-text app using [Jina](https://docs.jina.
44

55
We will use:
66

7-
* DocArray V2: To load and preprocess multimodal data such as image, text and audio.
7+
* DocArray >=0.30: To load and preprocess multimodal data such as image, text and audio.
88
* Jina: To serve the model quickly and create a client.
99

1010
## Install packages

0 commit comments

Comments
 (0)