Skip to main content
search runs on the iPhone against the index. It needs no network connection. Rollup learns only how many searches ran, as a count in the SDK’s run reports, never what was searched.

What a query can say

Search reads the parts of the query it understands and matches the rest against what photos show and say:
  • Dates, such as “last spring”, “in March”, “2025” or a holiday.
  • Media, such as “videos” or “screenshots”.
  • Places: countries, cities, neighborhoods, venue names and kinds of places, such as “ramen” or “museum”.
  • What photos show, matched against the image and its labels.
  • Text in images, such as signs, menus and screenshots.
results.plan tells you how search read the query: its operation, its retrievalIntent, the visualText left to match after dates, media and places, and the sort.

Results

Results come most relevant first. Each SearchResult carries what the index holds about the asset:
  • id: the PhotoKit local identifier. Load the image yourself with PhotoKit.
  • date and timeZone: when and in which time zone it was taken.
  • mediaType and isFavorite.
  • location: neighborhood, city, metro, country and coordinates.
  • places and cuisines: the venue its visit resolved to, and cuisines for food photos. Empty when places is off.
  • labels: what the photo shows, with probabilities.
  • text: text read from the image, and screenshot for what was read from a screenshot.
  • score, relevance, matchedText and matchReasons: why it matched.
See SearchResults for every field.

Loading images

The SDK returns identifiers, not images. Use PhotoKit to load them:

Errors

  • noIndex: nothing is indexed yet. Wait until indexing.state.isSearchable is true.
  • notConfigured: call configure first.
  • accessRevoked: your app’s Rollup key no longer works. See Keys and revocation.