Let the system refresh the Spotlight index - #5658
Draft
bgoncal wants to merge 1 commit into
Draft
Conversation
Today the index only updates when the database changes or the app returns to the foreground, so entries can sit stale until something else triggers a pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI Policy
Select exactly one option that describes AI usage in this contribution:
Summary
Adopts
IndexedEntityQuery, new in iOS 27, so the system can ask for a Spotlight refresh instead of waiting for the app.Today the index is only rebuilt when the local database changes or the app returns to the foreground, so an entry can stay stale until something else happens to trigger a pass. With this, the system asks when it notices the index may be out of date, either for named entities or for everything.
Draft: this needs Xcode 27, and CI is still on 26.4, so its checks will fail until the runner is bumped. Built and verified locally against Xcode 27 beta.
Screenshots
No UI. The only visible effect is Spotlight results being fresher.
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes
This started out larger. Adopting the calendar App Schema turned out not to be the annotation change the comment in
HACalendarAppEntitypredicted: the schema domain is iOS 27, so annotating the entity makes the type iOS 27, which cascades to its query, all three calendar intents and the Spotlight extension, and would put the existing calendar feature out of reach below iOS 27.Apple's guidance for that case is to add a parallel schema-conforming type rather than restrict the shipped one, which for calendars means a second entity, its query and create/update/delete intents living alongside today's. That is a design decision worth taking on its own, so it is left out here.