Class

CSSearchableItemAttributeSet

The set of properties to display for a searchable item.

Declaration

@interface CSSearchableItemAttributeSet : NSObject

Overview

To make content searchable, create an attribute set that contains properties that specify the metadata to display about an item (represented by a CSSearchableItem object) when it appears in a search result.

The attributes you choose depend on your domain. You can use the properties that Core Spotlight provides in categories defined on CSSearchableItemAttributeSet (such as Media and Documents), or you can define your own. If you want to define a custom attribute, be as specific as possible in your definition and use the contentTypeTree property so that your custom attribute can inherit from a known type.

A CSSearchableItemAttributeSet object should be changed from only one thread at a time. Concurrent access to properties in an attribute set has undefined behavior.

Topics

Getting an Attribute Set

- initWithItemContentType:

Creates an attribute set for the specified content type.

Working with Custom Attributes

- setValue:forCustomKey:

Sets the value for a custom attribute key.

- valueForCustomKey:

Returns the value associated with the specified custom attribute key.

Describing Documents

audiences

A class of entity for whom the item is intended or useful.

contentDescription

A description of the item’s content.

creator

The name of the application used to create the content.

encodingApplications

The name of the application used to convert the original content into a PDF stream.

fileSize

The size of the document file.

fontNames

An array of font names used in the document.

identifier

A formal identifier that references the document the item represents.

kind

A description of the kind of document the item represents.

pageCount

The number of pages in the document.

pageHeight

The height of the document page in points (72 points per inch).

pageWidth

The width of the document page in points (72 points per inch).

securityMethod

The security method (that is, a type of encryption) used to protect the document file.

subject

The subject of the document.

theme

The theme of the document.

Describing Events

allDay

A value that indicates if the event covers an entire day.

completionDate

The date on which the item was completed.

dueDate

The date on which the item is due.

endDate

The end date for the item.

importantDates

An array of important dates associated with the item.

startDate

The start date for the item.

Describing General Attributes

alternateNames

An array of localized strings that represent alternate display names for the item.

contentType

The uniform type identifier (that is, UTI) of the item.

contentTypeTree

An attribute type that identifies a custom hierarchy of types to describe the attributes of your item.

contentURL

The file URL of the content to be indexed.

displayName

A localized string that contains the name of the item, suitable to display in the user interface.

keywords

An array of keywords associated with the item, such as work, birthday, important, and so on.

metadataModificationDate

The date on which the last metadata attribute was changed.

path

The complete path to the item.

relatedUniqueIdentifier

For activities, the unique identifier for the item to which the activity is related.

thumbnailData

Image data that represents the thumbnail of the item.

thumbnailURL

The local file URL of the thumbnail image for the item.

title

The title of the item.

domainIdentifier

An identifier that represents the domain or owner of the item.

weakRelatedUniqueIdentifier

For activities, the unique identifier for the item to which the activity is related, but not linked.

Describing Places

altitude

The altitude of the item in meters above sea level, expressed using the WGS84 datum.

city

The city of the item’s origin according to guidelines established by the provider.

country

The full, publishable name of the country or primary location in which the intellectual property of the item was created, according to guidelines established by the provider.

GPSAreaInformation

Information about the GPS area.

GPSDOP

The GPS dilution of precision value.

GPSDateStamp

The date and time related to the GPS value.

GPSDestBearing

The bearing to the destination point.

GPSDestDistance

The distance to the destination point.

GPSDestLatitude

The latitude of the destination point.

GPSDestLongitude

The longitude of the destination point.

GPSDifferental

The differential correction applied to the GPS receiver.

GPSMapDatum

The geodetic data used by the GPS receiver.

GPSMeasureMode

The measurement precision mode in use by the GPS receiver.

GPSProcessingMethod

The location finding method used by the GPS receiver.

GPSStatus

The status of the GPS receiver.

GPSTrack

The direction of travel of the item in degrees from true north.

headline

A publishable string that provides a synopsis of the contents of the item.

imageDirection

The direction of the item's image in degrees from true north.

instructions

Instructions that concern the use of the item, such as an embargo or warning.

latitude

The latitude of the item in degrees north of the equator, expressed using the WGS84 datum.

longitude

The longitude of the item in degrees east of the prime meridian, expressed using the WGS84 datum.

namedLocation

The name of the location or point of interest associated with the item.

speed

The speed of the item in kilometers per hour.

stateOrProvince

The province or state of origin according to guidelines established by the provider.

timestamp

The timestamp on the item.

fullyFormattedAddress

The fully formatted address of the item, received from MapKit.

postalCode

The postal code for the item according to guidelines established by the provider.

subThoroughfare

The sublocation, such as a street number, for the item according to guidelines established by the provider.

thoroughfare

The thoroughfare associated with the location, such as a street name, for the item according to guidelines established by the provider.

Describing Media

comment

A comment related to the media file.

contentCreationDate

The date on which the contents of the file was created.

contentModificationDate

The date on which the contents of the file was last modified.

contentSources

An array of sources from which the media was obtained.

copyright

The copyright date of the content.

downloadedDate

The most recent date on which the file was downloaded or received.

editors

A list of editors who have worked on the file.

lastUsedDate

The date on which the file was last used.

participants

A list of people who are visible in an image or movie or written about in a document.

projects

A list of projects of which this file is a part.

addedDate

The date on which the item was moved into its current location.

codecs

The codecs used to encode/decode the media.

contactKeywords

A list of contacts who are associated with the content in some way, not including the author.

deliveryType

The delivery type of the file.

duration

The duration (if appropriate) of the content of the file, in seconds.

mediaTypes

The media types present in the content.

organizations

A list of companies or organizations that created the content.

streamable

A value that indicates if the content is prepared for streaming.

totalBitRate

The total bit rate of the media, combining audio and video.

audioBitRate

The audio bit rate of the media.

version

A version string associated with the file.

videoBitRate

The video bit rate of the media.

contributors

A list of people, organizations, or services that made contributions to the media content.

languages

A list of the included languages for the intellectual content of the media.

publishers

A list of people, organizations, services, or other entities responsible for making the media available.

rights

A link to information about the rights held in and over the media.

role

Indicates the role of the content creator.

contentRating

A value that indicates if the media contains explicit content.

coverage

A list of descriptors that specify the extent or scope of the media.

director

The name of the director of the media (for example, a movie director).

genre

The genre of the media.

information

Information about the media.

local

A value that indicates if the media is local.

originalFormat

The original format of the media.

originalSource

The original source of the media.

performers

A list of performers in the media.

playCount

A user-supplied play count for the media.

producer

The producer of the content.

rating

The user-supplied rating of the media.

ratingDescription

A description of the rating.

URL

The URL associated with the media.

Describing Music

album

The title for a collection of audio media.

artist

The artist associated with the media.

audioChannelCount

The number of channels in the audio data contained in the file.

audioEncodingApplication

The name of the application that encoded the data contained in the audio file.

audioSampleRate

The sample rate of the audio data contained in the file as a float value representing HZ (that is, audio frames/second), such as 44100.0 or 22254.54.

audioTrackNumber

The track number of a song or audio composition when it is part of an album.

composer

The composer of the song or audio composition contained in the audio file.

keySignature

The musical key of the song or audio composition contained in the file, such as C, Dm, or F#m.

lyricist

The lyricist or text writer for the song or audio composition contained in the file.

musicalGenre

The musical genre of the song or audio composition contained in the file, such as Jazz, Pop, Rock, or Classical.

recordingDate

The recording date of the song or audio composition.

tempo

The tempo of the music contained in the audio file in beats per minute.

timeSignature

The time signature of the musical composition contained in the audio or MIDI file in a string, such as "4/4" or "7/8".

generalMIDISequence

A value that indicates whether the MIDI sequence contained in the file is set up for use with a general MIDI device.

musicalInstrumentCategory

The category of the instrument associated with the audio file.

musicalInstrumentName

The name of an instrument within the context of an instrument category.

Describing Images

ISOSpeed

The ISO speed setting for the camera at the time the image was captured.

acquisitionMake

The manufacturer of the device that was used to capture the image.

acquisitionModel

The model of the device that was used to capture the image.

aperture

The size of the lens aperture at the time the image was captured, as a log-scale APEX value.

bitsPerSample

The number of bits per sample.

cameraOwner

The owner of the camera used to capture the image.

colorSpace

The color space model used in this image, such as RGB, CMYK, YUV, or YCbCr.

flashOn

A value that indicates if the flash was used to capture the image.

focalLength

The actual focal length of the lens in millimeters.

focalLength35mm

A value that indicates if the focal length is 35mm.

layerNames

An array that contains the names of the various layers in the file.

lensModel

The model of the lens used to capture this image.

orientation

The orientation of the data.

pixelCount

The total number of pixels in the image.

pixelHeight

The height of the item, such as image or video frame height, in pixels.

pixelWidth

The width of the item, such as image or video frame width, in pixels.

whiteBalance

The white balance setting of the camera when the image was acquired.

EXIFGPSVersion

The version of GPS Info IFD header that was used to generate the metadata for the image.

EXIFVersion

The version of the EXIF header that was used to generate the metadata for the image.

exposureMode

The mode that was used for the exposure for the image.

exposureProgram

The class of the program used by the camera to set exposure when the image is captured.

exposureTime

The time that the lens was open during exposure, in seconds.

exposureTimeString

The time that the lens was open during exposure, in a string, such as "1/250 seconds".

fNumber

The focal length of the lens divided by the diameter of the aperture when the image was captured.

hasAlphaChannel

Indicates if the image file has an alpha channel.

maxAperture

The smallest F number of the lens.

meteringMode

The metering mode.

profileName

The name of the color profile used for the image.

redEyeOn

A value that indicates if red-eye reduction was used when the image was captured.

resolutionHeightDPI

The resolution height of this image in DPI.

resolutionWidthDPI

The resolution width of this image in DPI.

Describing Messages

Common Mailbox Identifiers

Constants that describe common mailbox names.

HTMLContentData

The HTML content of the document encoded as an NSData object representing a UTF-8 encoded string.

accountHandles

An array of the canonical handles for the account with which the message is associated.

accountIdentifier

The unique identifier for the account with which the message is associated, if any.

additionalRecipients

An array of CSPerson objects representing the content of the Cc: field in an email message.

authorAddresses

An array of addresses associated with the author of the message.

authorEmailAddresses

An array of email addresses associated with the author of the message.

authorNames

An array of names representing the authors who have worked on the message.

authors

An array of CSPerson objects representing the content of the From: field in an item.

emailAddresses

An array of email addresses associated with the message.

emailHeaders

A dictionary that contains all the headers of the message.

hiddenAdditionalRecipients

An array of CSPerson objects representing the content of the Bcc: field in an email message.

instantMessageAddresses

An array of instant message addresses for the message.

likelyJunk

A value that indicates if the message is likely to be considered junk.

mailboxIdentifiers

An array of mailbox identifiers associated with the message.

phoneNumbers

An array of phone numbers associated with the message.

primaryRecipients

An array of CSPerson objects representing the content of the To: field in an email message.

recipientAddresses

An array of addresses associated with the recipients of the message.

recipientEmailAddresses

An array of email addresses associated with the recipient.

recipientNames

An array of names representing the recipients of this message.

textContent

The textual content of the message.

Describing Containment

containerDisplayName

A localized string that specifies the name of a container to which the item belongs, suitable to display in the user interface.

containerIdentifier

The identifier of the container to which the item belongs.

containerOrder

The order of the item within the container.

containerTitle

The title of the container to which the item belongs.

Supporting Actions

supportsNavigation

A value that indicates whether it makes sense to support navigation to the location represented by the item.

supportsPhoneCall

A value that indicates whether it makes sense to allow a phone call to a number associated with the item.

Relationships

Inherits From

See Also

Items

CSCustomAttributeKey

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