Function

SKIndexSetDocumentProperties

Sets the application-defined properties of a document URL object (of type SKDocumentRef).

Declaration

void SKIndexSetDocumentProperties(SKIndexRef inIndex, SKDocumentRef inDocument, CFDictionaryRef inProperties);

Parameters

inIndex

An index containing the document URL object whose properties you want to set.

inDocument

The document URL object whose properties you want to set.

inProperties

A CFDictionary object containing the properties to apply to the document URL object.

Discussion

Search Kit document URL objects (of type SKDocumentRef) can have an optional, application-defined properties dictionary to hold any information you’d like to associate with the document represented by a document URL object—such as timestamp, keywords, and so on.

Use SKIndexSetDocumentProperties to persistently set application-defined properties for a document URL object in an index. This function replaces a document URL object’s existing properties dictionary with the new one. To obtain a copy of a document URL object’s properties dictionary, use SKIndexCopyDocumentProperties.

Special Considerations

You must set any desired properties on a document URL object after adding the document URL object to an index. Adding a document URL object to an index clears the object’s preexisting properties.

See Also

Working with Documents and Terms

SKDocumentCreateWithURL

Creates a document URL object (of type SKDocumentRef) from a CFURLRef object.

SKDocumentCreate

Creates a document URL object (of type SKDocumentRef) based on a scheme, parent, and name.

SKDocumentCopyURL

Builds a CFURLRef object from a document URL object (of type SKDocumentRef).

SKDocumentGetName

Gets the name of a document URL object (of type SKDocumentRef).

SKDocumentGetParent

Gets the parent of a document URL object (of type SKDocumentRef).

SKDocumentGetSchemeName

Gets the scheme name for a document URL object (of type SKDocumentRef).

SKDocumentGetTypeID

Gets the type identifier for Search Kit document URL objects.

SKIndexCopyDocumentForDocumentID

Obtains a document URL object (of type SKDocumentRef) from an index.

SKIndexCopyInfoForDocumentIDs

Gets document names and parent IDs based on document IDs.

SKIndexCopyDocumentRefsForDocumentIDs

Gets document URL objects (of type SKDocumentRef) based on document IDs.

SKIndexCopyDocumentURLsForDocumentIDs

Gets document URLs based on document IDs.

SKIndexCopyDocumentIDArrayForTermID

Obtains document IDs for documents that contain a given term.

SKIndexCopyTermIDArrayForDocumentID

Obtains the IDs for the terms of an indexed document.

SKIndexCopyTermStringForTermID

Obtains a term, specified by ID, from an index.

SKIndexGetTermIDForTermString

Gets the ID for a term in an index.

SKIndexCopyDocumentProperties

Obtains the application-defined properties of an indexed document.

SKIndexGetDocumentState

Gets the current indexing state of a document URL object (of type SKDocumentRef) in an index.

SKIndexGetDocumentTermCount

Gets the number of terms for a document in an index.

SKIndexGetDocumentTermFrequency

Gets the number of occurrences of a term in a document.

SKIndexGetTermDocumentCount

Gets the number of documents containing a given term represented in an index.

SKIndexGetDocumentID

Gets the ID of a document URL object (of type SKDocumentRef) in an index.