Context
Search
Retrieve relevant local moments, photos, and videos with search().
Search operates against the on-device semantic and media index. It returns relevant items from the camera roll, while Profile returns maintained user understanding and Query computes an answer.
Find media for a workflow#
let results = try await Rollup.search( "weekend hikes" )
[ { "id": "A7E5D219-8C43-4F6B-915A-2D9E7C301B64/L0/001", "score": 0.0352, "matchedTimestamp": 6.4 }, { "id": "B8F6E320-9D54-407C-A26B-3E0F8D412C75/L0/001", "score": 0.0315 } ]
Search returns an array of ranked local asset references, shown here encoded as JSON. Each id is a local asset identifier. The optional matchedTimestamp is an offset in seconds within a matching video; it is omitted when no timestamp is available. Resolve assets and their moment metadata locally in the host app.
Default results contain id, score, and an optional matchedTimestamp. The channels field is available as optional debugging metadata.
Use Search when the product needs an item#
- Find photos and videos from past hikes.
- Find memories relevant to a conversation.
- Select candidate photos for a recap.
- Locate past outfits, products, or places.
- Retrieve moments relevant to an app workflow.
Local SDK operation
Search runs on the device. Results refer to local assets the host app is authorized to access. There is no server-side Search endpoint, remote camera-roll browser, or photo-download API.