diff --git a/docarray/array/document.py b/docarray/array/document.py index 1daedf089b6..c5395622b1f 100644 --- a/docarray/array/document.py +++ b/docarray/array/document.py @@ -47,7 +47,7 @@ def __init__( self._rebuild_id2offset() elif isinstance(docs, DocumentArray): self._data = docs._data - self._id_to_index = docs._id_to_index + self._id_to_index = docs._id2offset else: self._data = list(docs) self._rebuild_id2offset()