docarray.array.match module#
- class docarray.array.match.MatchArray(docs, reference_doc)[source]#
Bases:
docarray.array.memory.DocumentArrayInMemory
MatchArray
inherits fromDocumentArray
. Itβs a subset of Documents that represents the matches- Parameters
docs β Set of matches of the reference_doc
reference_doc (Document) β Reference
Document
for the sub-documents
- append(document)[source]#
Add a matched document to the current Document.
- Parameters
document (Document) β Sub-document to be added
- property reference_doc: Document#
Get the document that this
MatchArray
referring to. :rtype: Document :return: the document the match refers to
- property granularity: int#
Get granularity of all document in this array. :rtype:
int
:return: the granularity of the documents of which these are match
- property adjacency: int#
Get the adjacency of all document in this array. :rtype:
int
:return: the adjacency of the array of matches
- TYPE_MAP: Dict#