​​ ​

The Apple Support Community will permanently close on November 20, 2026. Starting today, the site will no longer accept new posts and is available in a read-only state.


You can continue to find trusted guidance and support on the official Apple Support site. 


We want to thank the community members who have contributed their time and expertise to help others with their Apple products.


Spotlight only finds titles, not contentDescription using CoreSpotlight in iOS 18 AppIntents

I’m implementing Spotlight search for notes app, using iOS 18’s AppIntents and CoreSpotlight. While my notes are indexed, the transcript and aiSummary fields (assigned to contentDescription and textContent) aren’t appearing in search results.

Current Implementation:


Indexing Setup:

@available(iOS 18.0, *)  
struct NoteEntryEntity: AppEntity, IndexedEntity, Identifiable {
// ...

var attributeSet: CSSearchableItemAttributeSet {
let attributeSet = defaultAttributeSet
attributeSet.title = title
attributeSet.contentDescription = transcript
attributeSet.textContent = [transcript, aiSummary].compactMap { $0 }.joined(separator: "\n\n")
attributeSet.keywords = (noteTags?.compactMap { $0.name } ?? [])
return attributeSet
}
}

Problem: Spotlight only finds titles, not transcript/aiSummary content.

Question: How does spotlight support search for content description?



iPhone 16 Pro

Posted on May 15, 2025 11:29 PM

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Spotlight only finds titles, not contentDescription using CoreSpotlight in iOS 18 AppIntents

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.