tballison commented on PR #3096:
URL: https://github.com/apache/tika/pull/3096#issuecomment-5513793761
This would leave client side to arbitrate thumbnail vs rendering. This is an
option to leave just one per:
```
Yes — there's a properly Tika-shaped home for it: ship the priority logic as
an UnpackSelector implementation, registered as a @TikaComponent. That's
exactly what the pluggable
selector interface exists for, and the PR's own docs already point people
there ("Custom EmbeddedDocumentExtractor is ignored; use UnpackSelector"). The
contributor keeps his
selection logic server-side, it's addressed purely by config name — and it
gets something his endpoint never had: it works everywhere pipes UNPACK mode
works, including
tika-async-cli batch runs, not just one tika-server route.
Concretely: a ThumbnailUnpackSelector next to StandardUnpackSelector in
tika-pipes-core, encoding his priority (raster THUMBNAIL at depth 1 → RENDERING
below a vector THUMBNAIL →
first-page RENDERING), selecting at most one document. Parse time:
{
"parse-context": {
"pdf-parser": { "imageStrategy": "RENDER_PAGES_AT_PAGE_END",
"maxRenderedPages": 1,
"ocr": { "dpi": 96, "imageType": "RGB" } },
"emf-parser": { "renderImage": true,
"renderOnlyEmbeddedResourceTypes": ["THUMBNAIL"] },
"wmf-parser": { "renderImage": true,
"renderOnlyEmbeddedResourceTypes": ["THUMBNAIL"] },
"thumbnail-unpack-selector": {},
"unpack-config": { "outputFormat": "FRICTIONLESS", "outputMode":
"ZIPPED",
"includeFullMetadata": true },
"embedded-limits": { "maxDepth": 3, "maxCount": 20 }
}
}
Result: a package containing exactly one image plus its metadata —
functionally his {metadata, image} response, minus the bespoke route. Or baked
into tika-config.json's
parse-context for a dedicated thumbnail server with zero request config.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]