-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Neural Search - From Prototype to Production with Jina
By :

In this section, we will discuss how Jina can capture and leverage the hierarchical structure of real-life data. In order to follow along with the existing code, check the chapter’s code for a folder named multires-lyrics-search
. This is the example we will be referring to in this section.
This example relies on the Document
type’s capacity to hold chunks (child documents) and refer to a specific parent. Using this structure, you can compose advanced arbitrary level hierarchies of documents within documents. This mimics various real-life data-related problems. Examples could be patches of images, sentences of a paragraph, video clips of a longer movie, and so on.
See the following code for how to perform this with Jina’s Document
API:
from jina import Document document = Document() chunk1 = Document(text='this is the first chunk') chunk2 = Document(text='this is the second chunk') document.chunks...