Contents

SKIndexCopyTermIDArrayForDocumentID(_:_:)

Obtains the IDs for the terms of an indexed document.

Declaration

func SKIndexCopyTermIDArrayForDocumentID(_ inIndex: SKIndex!, _ inDocumentID: SKDocumentID) -> Unmanaged<CFArray>!

Parameters

  • inIndex:

    The index containing the document URL object (SKDocumentRef) and associated textual content.

  • inDocumentID:

    The ID of the document whose term IDs you are copying.

Return Value

A CFArray containing CFNumbers, each of which represents the ID for a term in a document.

Discussion

To derive the list of terms contained in a document, use this function to obtain an array of the term IDs, then convert each ID into the corresponding term with the SKIndexCopyTermStringForTermID(_:_:) function.

Version-Notes

In versions of macOS prior to OS X v10.4, the parameter type for inDocumentID was CFIndex. In macOS 10.4 and later, the parameter type is SKDocumentID.

See Also

Working with Documents and Terms