<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreSpotlight",
  "identifier" : "/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core Spotlight",
      "FoundationModels",
      "_CoreSpotlight_FoundationModels"
    ],
    "preciseIdentifier" : "s:31_CoreSpotlight_FoundationModels0B10SearchToolV13ContentDomainV"
  },
  "title" : "SpotlightSearchTool.ContentDomain"
}
-->

# SpotlightSearchTool.ContentDomain

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

```
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:

```swift
// 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

[`static var audio: SpotlightSearchTool.ContentDomain`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/audio-swift.type.property)

Music, podcasts, voice memos, and other audio content.

[`static func audio(SpotlightSearchTool.ContentDomain.Audio) -> SpotlightSearchTool.ContentDomain`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/audio(_:))

Music, podcasts, voice memos, and other audio content with custom attribute mapping.

[`struct Audio`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/Audio-swift.struct)

Attribute mapping for the audio domain.

### Getting the calendar domain

[`static var calendar: SpotlightSearchTool.ContentDomain`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/calendar-swift.type.property)

Calendar events, meetings, and scheduled items.

[`static func calendar(SpotlightSearchTool.ContentDomain.Calendar) -> SpotlightSearchTool.ContentDomain`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/calendar(_:))

Calendar events, meetings, and scheduled items with custom attribute mapping.

[`struct Calendar`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/Calendar-swift.struct)

Attribute mapping for the calendar domain.

### Getting the communications domain

[`static var communications: SpotlightSearchTool.ContentDomain`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/communications-swift.type.property)

Email, messaging, and other person-to-person communication.

[`static func communications(SpotlightSearchTool.ContentDomain.Communications) -> SpotlightSearchTool.ContentDomain`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/communications(_:))

Email, messaging, and other person-to-person communication with custom attribute mapping.

[`struct Communications`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/Communications-swift.struct)

Attribute mapping for the communications domain.

### Getting the documents domain

[`static var documents: SpotlightSearchTool.ContentDomain`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/documents-swift.type.property)

Documents, notes, and text-heavy content.

[`static func documents(SpotlightSearchTool.ContentDomain.Documents) -> SpotlightSearchTool.ContentDomain`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/documents(_:))

Documents, notes, and text-heavy content with custom attribute mapping.

[`struct Documents`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/Documents-swift.struct)

Attribute mapping for the documents domain.

### Getting the items domain

[`static var items: SpotlightSearchTool.ContentDomain`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/items-swift.type.property)

Any items with title, text, and dates.

[`static func items(SpotlightSearchTool.ContentDomain.Items) -> SpotlightSearchTool.ContentDomain`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/items(_:))

Any items with title, text, and dates with custom attribute mapping.

[`struct Items`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/Items-swift.struct)

Attribute mapping for the items domain.

### Getting the visual media domain

[`static var visualMedia: SpotlightSearchTool.ContentDomain`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/visualMedia-swift.type.property)

Photos, videos, and other visual content.

[`static func visualMedia(SpotlightSearchTool.ContentDomain.VisualMedia) -> SpotlightSearchTool.ContentDomain`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/visualMedia(_:))

Photos, videos, and other visual content with custom attribute mapping.

[`struct VisualMedia`](/documentation/CoreSpotlight/SpotlightSearchTool/ContentDomain/VisualMedia-swift.struct)

Attribute mapping for the visual media domain.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)