Skip to content

fix(search): tika key fixes - #3651

Merged
dschmidt merged 3 commits into
mainfrom
fix/search-tika-4-keys
Oct 3, 2026
Merged

dschmidt merged 3 commits into
mainfrom
fix/search-tika-4-keys

Conversation

@dschmidt

@dschmidt dschmidt commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Tika 4 added prefixes to some keys after I upstreamed the features (TIKA-4816).
The extractor now reads the keys that actually made it to the 4.x.x releases.

photo.iso came from Base ISO, a Canon maker note tag holding Canon's raw encoded value: empty for every other camera, wrong for Canon (256 for an ISO 800 shot). It now comes from exif:IsoSpeedRatings, which tika 3 and tika 4 both emit.

CI and the acceptance compose move from 4.1.0-SNAPSHOT / 4.0.0-full to the released apache/tika:4.1.0-full.

@kulmann you did the initial photo facet implementation, hence I'm adding you as reviewer :)

@codacy-production

codacy-production Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

🟢 Coverage 100.00% diff coverage · -0.01% coverage variation

Metric Results
Coverage variation ✅ -0.01% coverage variation (-1.00%)
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (a325542) 89111 21640 24.28%
Head commit (2282082) 89111 (+0) 21630 (-10) 24.27% (-0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3651) 10 10 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@dschmidt dschmidt changed the title fix(search): read the tika 4 live photo keys and the exif iso fix(search): tika key fixes Oct 3, 2026
@dschmidt
dschmidt force-pushed the fix/search-tika-4-keys branch from 8403307 to 2282082 Compare October 3, 2026 09:11
Tika 4 prefixes its metadata keys (mp4:, img:), so the live photo facet was never built there. Live photo support needs tika 4: tika 3 got the video keys only in 3.3.2 and never the still image time. The content key is read through one lookup, marked tika 4 and tika 3 legacy.
Base ISO is a Canon maker note tag holding Canon's raw encoded value, not the iso of the shot: other cameras got no iso, Canon photos a wrong one (256 for an ISO 800 shot). exif:IsoSpeedRatings is there on tika 3 and tika 4.
@dschmidt
dschmidt requested a review from kulmann October 3, 2026 09:21
@dschmidt
dschmidt marked this pull request as ready for review October 3, 2026 09:21

@butonic butonic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the code be backwards compatible to tika 4.0?

@dschmidt

dschmidt commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Yes, nothing broke between 4.0 and 4.1.

AFAICT they just introduced additional prefixes after my contributions got merged but before 4.0 was released.

Every key the PR reads (mp4:com.apple.quicktime.*, img:Content Identifier, quicktime:still-image-time, exif:IsoSpeedRatings, tk:content) is emitted by 4.0.0 under the same name, checked against the /rmeta output of apache/tika:4.0.0-full and 4.1.0 for the same files. What 4.0.0 lacks is unrelated to this change: video:fourcc / audio:fourcc and the embedded video of a motion photo only exist since 4.1.0.
We rely on the embedded file to determine whether the motion photo facet should be added (The video is often removed while the Motion Photo metadata is kept in the file, so by checking for the embedded file we avoid showing a Motion Photo Badge in the UI, when there is no actual video embedded in the file).

One change towards tika 3: the live photo facet now needs tika 4, the unprefixed tika 3 keys are no longer read - but the feature was backported partially only anyway, so it never worked with the Tika 3 series anyway.

TL;DR: This does not break anything with Tika 4.0.x that worked before, but it's better to use Tika >= 4.1.x simply because that provides more data that we can make use of

@dschmidt
dschmidt merged commit 4dec190 into main Oct 3, 2026
66 of 67 checks passed
@dschmidt
dschmidt deleted the fix/search-tika-4-keys branch October 3, 2026 12:27
dschmidt added a commit to opencloud-eu/web that referenced this pull request Oct 3, 2026
Includes opencloud-eu/opencloud#3651, which makes the search service read
the Tika 4 keys of the live photo facet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants