IndexOptions to configure, or change them later through Rollup.shared.indexing.options. Every option has a default, so you only set what you want to change.
Options
Hidden photos are never indexed. With limited Photos access, the SDK indexes only the photos the person selected.
Time window
The window decides which capture dates the index holds. Spans can be days, weeks, months or years:.days(30), .weeks(8), .months(3), .years(1).
- Growing
- Sliding
.growing(from: .months(3)) reaches back three months from the day the index was first built, and keeps adding new photos from then on. Nothing ages out, so the index grows with the library.Changing options
A change applies to the existing index in place. The SDK does not rebuild the index, except when you turnplaces on or off.
- Widening the window or adding a media type indexes the photos that are now missing.
- Narrowing the window, removing a media type, a sliding window passing a photo, or reaching
maxPhotosremoves the photos that fall outside. - Turning
focusto.foodremoves indexed photos that are not food. Turning it back to.everythingindexes the photos it left out. - Turning
placeson or off rebuilds the index.
Removing photos needs full Photos access. With limited access, the SDK adds photos but does not remove them when you narrow the selection.
Places
Withplaces on, the SDK resolves where photos were taken: the venue of each visit (a restaurant, a museum, a stadium), its cuisine for food visits, and the neighborhood and city. To do this it downloads place data from Rollup’s server for the areas the photos fall in.
Without places, search still reads dates, cities and countries from an offline geography on the device, and everything a photo shows or says. Venue names, cuisines and venue categories are not available.
Food focus
focus = .food indexes only food photos, as Apple’s on-device food detection finds them. Screenshots are not indexed in this mode. On one library this was about one photo in ten, so indexing is much faster, but search, query and profile only know about food.
Cellular data
WithallowsCellular set to false, every download waits for Wi-Fi, including the about 225 MB of models on first run. iCloud Photos follows the person’s own Photos settings when the SDK needs a photo that is not on the iPhone.
