Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

22096010: Impossible to inspect the contents of the Core Spotlight index #24

Open
openradar-mirror opened this issue Aug 3, 2015 · 0 comments

Comments

@openradar-mirror
Copy link

Description

Summary:
Core Spotlight indices behave as a write-only variable. For example, it is impossible to inspect their contents to find out what CSSearchableItems are currently indexed in the searchable index.

In case the application works with data that may be changed outside of it (e.g. account state is being synced across devices via a third party service) this may be necessary to find out whether the index contains stale data.

Lack of this API forces developers to reimplement (possibly imperfectly) the index as a local database and make sure the Core Spotlight and their own index remain in sync.

Steps to Reproduce:
Investigate the headers of CSSearchableIndex.

Expected Results:
CSSearchableIndex instance should have a public method such as:

  • (void)enumerateSearchableItemsUsingBlock:(void (^ nonnull)(NSArray<CSSearchableItem *> nonnull *searchableItems))block;

Such method would call the block with an array containing the CSSearchableItems currently present in the searchable index.

Actual Results:
No such method exists.

Version:
iOS 9 beta 4

Configuration:
iPhone 6 and iOS Simulator

Product Version: iOS 9.0 (13A4305g)
Created: 2015-07-31 20:39:54.330690
Originated: 2015-07-31T00:00:00
Open Radar Link: http://www.openradar.me/22096010

@openradar-mirror openradar-mirror added this to the iOS SDK milestone Aug 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant