NAME
Dancer::SearchApp::Extractor - metadata extractors
METHODS
->extract( %options )
my $info = $tika->get_meta( $content );
my $entry = $extractor->extract(
url => $url,
info => $info,
#content => \$content, # if we have it
filename => $file, # if we have it
folder => $res{ folder }, # if we have it
)->then(sub { ... });
# Do something with the hashrefs we get back,
# like insert the first one into Elasticsearch
This method goes through all installed plugins and offers the file for inspection. The $info
parameter will contain the information and content extracted by Apache Tika, so especially the MIME type will be available.
The method returns a promise so that analysis can happen in the background. The promise will be passed a list of the found items that were not undef
. Currently no ranking is performed and all plugins are treated as equally applicable.