jina.types.sets.chunk

class jina.types.sets.chunk.ChunkSet(docs_proto, reference_doc)[source]

Bases: jina.types.sets.document.DocumentSet

append(document, **kwargs)[source]

Add a sub-document (i.e chunk) to the current Document

Return type

Document

Returns

the newly added sub-document in Document view

Note

Comparing to DocumentSet.append(), this method adds more safeguard to make sure the added chunk is legit.

property parent_doc

Get the document that this ChunkSet belonging to

Return type

Document

property granularity

The granularity of all document in this set

Return type

int

property adjacency

The adjacency of all document in this set

Return type

int