Commit cf21b1d0 authored by Volker Krause's avatar Volker Krause
Browse files

If we have multiple extractors with results, take all of them

parent e8082c8c
......@@ -69,13 +69,17 @@ void ExtractorEnginePrivate::processNode(ExtractorDocumentNode& node)
std::vector<const AbstractExtractor*> extractors = m_additionalExtractors;
m_repo.extractorsForNode(node, extractors);
ExtractorResult nodeResult;
for (const auto &extractor : extractors) {
auto res = extractor->extract(node, q);
if (!res.isEmpty()) {
m_usedExtractor = extractor->name();
node.setResult(std::move(res));
nodeResult.append(std::move(res));
}
}
if (!nodeResult.isEmpty()) {
node.setResult(std::move(nodeResult));
}
node.processor()->postExtract(node);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment