Class

CSCustomAttributeKey

A key associated with a custom attribute for a searchable item.

Declaration

@interface CSCustomAttributeKey : NSObject

Overview

The CSCustomAttributeKey class defines a key that you can associate with a custom attribute for a searchable item. Item attributes provide metadata about the item that can be indexed and displayed to users in search results.

Although the Core Spotlight framework provides several predefined attributes, such as title and description, you can create a CSCustomAttributeKey object to specify a custom attribute that makes sense in your domain.

Topics

New Methods

- initWithKeyName:

Returns a new custom attribute key with the specified name.

- initWithKeyName:searchable:searchableByDefault:unique:multiValued:

Returns a new custom attribute key with the specified name and properties.

keyName

The name of the custom attribute key.

multiValued

A Boolean value that indicates if the custom attribute is likely to have multiple values, such as arrays, associated with it.

searchable

A Boolean value that indicates if the custom attribute can be specified as a search term.

searchableByDefault

A Boolean value that indicates if the custom attribute should be searchable by default.

unique

A Boolean value that indicates if duplicate custom attribute values should be treated as the same value to save storage space.

Relationships

Inherits From

See Also

Items

CSSearchableItemAttributeSet

The set of properties to display for a searchable item.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software