Contents

SpotlightSearchTool.ContentDomain

A content domain that defines which fields and attribute mappings are presented to the model during a focused search session.

Declaration

struct ContentDomain

Overview

Each domain exposes a small set of fields tuned for a specific category of user content. Developers can override the default attribute mappings.

Usage:

// Default communications schema
let guide = SpotlightSearchTool.Guide(level: .focused(.communications))

// Custom document field mapping
let domain = SpotlightSearchTool.ContentDomain.Documents(
    authors: [.authorNames, SearchableItemAttribute(rawValue: "com.myapp.chef")]
)
let guide = SpotlightSearchTool.Guide(level: .focused(.documents(domain)))

Topics

Getting the audio domain

Getting the calendar domain

Getting the communications domain

Getting the documents domain

Getting the items domain

Getting the visual media domain

See Also

Configuring the tool behavior