vitrivr / vitrivr-engine

vitrivr's next-generation retrieval engine. It is capable of extracting and retrieving a wider range of multimedia objects such as audio, video, images or 3d models.
https://vitrivr.org
MIT License
6 stars 3 forks source link

Context for Operator Pipelines (Extraction / Retrieval) #12

Closed ppanopticon closed 1 year ago

ppanopticon commented 1 year ago

Task Description

Now that a first version of our Extraction Operator Pipeline is seems to be working, I have spotted a minor things that should be adjusted.

The reason the adjustment is needed can best be illustrated using the ContentFactory. Instances of this class are handed to the operators that need it using the parameter map. Depending on how this is implemented, every operatore uses its own instance, which defeats the purpose of the factory when, e.g., considering caching.

Instead, I would suggest this to be setting that is global for an instance of a extraction pipeline. Furthermore, I would propose a Context object, that can hold helper classes such as the ContentFactory. This Context is then handed to all the the operators, which then can decide whether or not to use certain classes.

The issue involves the following changes:

Dependencies

None

Boundary Conditions

None

lucaro commented 1 year ago

Agreed. This context can then also hold additional relevant information during retrieval, such as the number of desired elements, etc.