Contents

SKIndexGetDocumentTermFrequency(_:_:_:)

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

Declaration

func SKIndexGetDocumentTermFrequency(_ inIndex: SKIndex!, _ inDocumentID: SKDocumentID, _ inTermID: CFIndex) -> CFIndex

Parameters

  • inIndex:

    The index containing the text of the document whose term count you are interested in.

  • inDocumentID:

    The ID of the document URL object whose associated term count you are interested in. Obtain a document ID by calling 1444437 Skindexgetdocumentid.

  • inTermID:

    The ID of the term whose number of occurrences you want.

Return Value

A CFIndex object containing the number of occurrences of a term in a document.

Discussion

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