What is the purpose of CSCustomAttributeKey

What is the purpose of CSCustomAttributeKey?


This looks like it would be something that is useful as it has a searchable property (e.g you can exclude things from being indexed?)


But as the properties which are actually displayed in spotlight seem to be limited to the displayName, thumbnail and contentDescription it's not obvious to me how this can be used. A non-indexable property which can't be displayed?


On a related note, if this isn't the intended purpose of CSCustomAttributeKey, then we need a way to mark default attribute keys e.g contentDescription as non-indexable. If I'm indexing an item, it may have some description to help the user determine whether it's the result they're looking for, but I don't always want that description to be indexed itself. I've filed a bug on this which is 21505746

Replies

Also it seems that the value you add to a CSCustomAttributeKey isn't actually indexed. Bug filed : 21562485

Thanks for the bug report. It's with the Spotlight engineering team to look at. And especially thanks for the test projects. Having those attached to the bug reports really helps streamline the diagnosis of bugs.

I meant to add that we track documentation bugs in our bug database as well so if you ever come across something that's confusing, incorrect, or simply not covered in the documentation, please file bug reports on those issues as well.