polimediaupv/paella

How store ocr slide content to allow search text slide with search toolbar button

Closed this issue · 1 comments

Have a usage question?

Hi,
i have ocr content of my slide, how can store it (in repository) to activate search over this text.

thx,

Paella can't do that out of the box.

You will need to create a custom plugin to search in your ocr content.
You will need to implement a SearchServicePlugIn plugin

class SearchServicePlugIn extends paella.FastLoadPlugin {
get type() { return 'SearchServicePlugIn'; }
getIndex() {return -1;}
search(text, next) {
throw new Error('paella.SearchServicePlugIn#search must be overridden by subclass');
}
}

and implement the search function.
You can find an example in the opencast project.
The opencast project has a plugin to search in the ocr texts os the slides. Sure you can do something similar.
https://github.com/opencast/opencast/blob/a515d816c2bb70b42b75307a41cf4cce2f9d40df/modules/engage-paella-player/src/main/paella-opencast/plugins/es.upv.paella.opencast.searchPlugin/mh_search.js#L25-L81