-
Notifications
You must be signed in to change notification settings - Fork 238
Document Filter Question #530
Copy link
Copy link
Closed
Description
I want to filter some docs in an executor, and found a solution here:
https://docarray.jina.ai/fundamentals/documentarray/access-elements/#index-by-boolean-mask
There are two questions:
- Is this the only way to filter document offered by docarray?
- There seems a wrong description here.
Note that if the length of the boolean mask is smaller than the length of a DocumentArray, then the remaining part is padded to False.
It seems the True masked doc will be removed and smaller boolean mask is padding with True.
Test code :
da = DocumentArray.empty(3)
mask = [True, False] # has same behave with [True, False, True]
del da[mask]
print(len(da)) # got 1Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels