Skip to content

feat(search): live photo facet - #3202

Open
dschmidt wants to merge 4 commits into
mainfrom
feat/search-live-photo-facet
Open

feat(search): live photo facet#3202
dschmidt wants to merge 4 commits into
mainfrom
feat/search-live-photo-facet

Conversation

@dschmidt

@dschmidt dschmidt commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Stacked on #3200 (motion photo).

Adds the Apple Live Photo facet to the search index, the search API and the graph driveItem.

An Apple Live Photo is a pair of files (a still + a separate .mov) linked by a shared content identifier. Maps contentId (from com.apple.quicktime.content.identifier on the video, or the Apple maker note Content Identifier on the still), stillImageTimeUs, auto, vitalityScore and vitalityScoringVersion. Without a pairing id (missing or empty) the facet is dropped entirely, and contentId is indexed as an opaque id, no case-insensitive or word-broken search siblings. Requires Tika 4 on both halves: the HEIC maker note is parsed since metadata-extractor 2.21.0, Tika 3 emits none of the keys, so the facet simply stays empty there. Verified against the pinned Tika 4.0 snapshot with a real .mov (com.apple.quicktime.live-photo.* atoms are surfaced generically); the still half is not yet verified against a real HEIC.

Needs a separate reva change (same as #3200): the WebDAV PROPFIND handler must know the livePhoto keys. It lives in vendored reva, so it needs its own reva PR + bump:

diff --git a/vendor/github.com/opencloud-eu/reva/v2/internal/http/services/owncloud/ocdav/propfind/propfind.go b/vendor/github.com/opencloud-eu/reva/v2/internal/http/services/owncloud/ocdav/propfind/propfind.go
index d86367a2c5..815a823e11 100644
--- a/vendor/github.com/opencloud-eu/reva/v2/internal/http/services/owncloud/ocdav/propfind/propfind.go
+++ b/vendor/github.com/opencloud-eu/reva/v2/internal/http/services/owncloud/ocdav/propfind/propfind.go
@@ -107,6 +107,13 @@ var (
 		"orientation",
 		"takenDateTime",
 	}
+	livePhotoKeys = []string{
+		"auto",
+		"contentId",
+		"stillImageTimeUs",
+		"vitalityScore",
+		"vitalityScoringVersion",
+	}
 )
 
 type countingReader struct {
@@ -887,6 +894,8 @@ func metadataKeys(pf XML) ([]string, []string) {
 					metadataKeys = append(metadataKeys, metadataKeysWithPrefix("libre.graph.image", imageKeys)...)
 				case "http://owncloud.org/ns/photo":
 					metadataKeys = append(metadataKeys, metadataKeysWithPrefix("libre.graph.photo", photoKeys)...)
+				case "http://owncloud.org/ns/livePhoto":
+					metadataKeys = append(metadataKeys, metadataKeysWithPrefix("libre.graph.livePhoto", livePhotoKeys)...)
 				default:
 					metadataKeys = append(metadataKeys, key)
 				}
@@ -944,7 +953,7 @@ func requiresExplicitFetching(n *xml.Name) bool {
 		}
 	case net.NsOwncloud:
 		switch n.Local {
-		case "favorite", "share-types", "checksums", "size", "tags", "audio", "location", "image", "photo":
+		case "favorite", "share-types", "checksums", "size", "tags", "audio", "location", "image", "photo", "livePhoto":
 			return true
 		default:
 			return false
@@ -1292,6 +1301,7 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
 			appendMetadataProp(k, "oc", "location", "libre.graph.location", locationKeys)
 			appendMetadataProp(k, "oc", "image", "libre.graph.image", imageKeys)
 			appendMetadataProp(k, "oc", "photo", "libre.graph.photo", photoKeys)
+			appendMetadataProp(k, "oc", "livePhoto", "libre.graph.livePhoto", livePhotoKeys)
 		}
 
 		if md.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER {
@@ -1579,6 +1589,10 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
 					if k := md.GetArbitraryMetadata().GetMetadata(); k != nil {
 						appendMetadataProp(k, "oc", "photo", "libre.graph.photo", photoKeys)
 					}
+				case "livePhoto":
+					if k := md.GetArbitraryMetadata().GetMetadata(); k != nil {
+						appendMetadataProp(k, "oc", "livePhoto", "libre.graph.livePhoto", livePhotoKeys)
+					}
 				case "name":
 					appendToOK(prop.Escaped("oc:name", md.Name))
 				case "shareid":

@dschmidt dschmidt changed the title feat(search): index and expose the live photo facet feat(search): live photo facet Jul 29, 2026
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from 75dff44 to bacb762 Compare July 29, 2026 23:47
@codacy-production

codacy-production Bot commented Jul 29, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 18 complexity · 0 duplication

Metric Results
Complexity 18
Duplication 0

View in Codacy

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

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

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (e6102c0) 88120 20619 23.40%
Head commit (5995938) 88220 (+100) 20637 (+18) 23.39% (-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 (#3202) 117 32 27.35%

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 force-pushed the feat/search-live-photo-facet branch 2 times, most recently from 4cf6a80 to ceb63a5 Compare July 30, 2026 11:39
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from ceb63a5 to bebf05c Compare August 18, 2026 16:33
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from bebf05c to 81b1f77 Compare August 31, 2026 15:21
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from 81b1f77 to 0368eb5 Compare August 31, 2026 17:01
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from 0368eb5 to 39ec929 Compare August 31, 2026 17:53
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from 39ec929 to 293db4d Compare August 31, 2026 17:55
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from 293db4d to 8981d20 Compare August 31, 2026 18:06
@dschmidt
dschmidt marked this pull request as ready for review August 31, 2026 18:07
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from 8981d20 to a8d73df Compare August 31, 2026 18:37
@fschade
fschade force-pushed the feat/search-live-photo-facet branch from a8d73df to 8488740 Compare September 1, 2026 05:17
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from 8488740 to f09f1f8 Compare September 1, 2026 07:14
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from f09f1f8 to 4cfc14e Compare September 1, 2026 11:12
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from 4cfc14e to 1a9e825 Compare September 1, 2026 13:30
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch 2 times, most recently from 0db2399 to 2f1ca63 Compare September 2, 2026 21:07
@butonic
butonic force-pushed the feat/search-live-photo-facet branch from 2f1ca63 to 8204688 Compare September 2, 2026 22:15
Comment thread protogen/proto/opencloud/messages/search/v0/search.proto Outdated
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from 8204688 to ad53ebe Compare September 2, 2026 23:14
Base automatically changed from feat/search-motion-photo-facet to main September 3, 2026 01:34
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from 25c78d1 to 5995938 Compare September 3, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants