SKIndexCopyDocumentIDArrayForTermID(_:_:)
Obtains document IDs for documents that contain a given term.
Declaration
func SKIndexCopyDocumentIDArrayForTermID(_ inIndex: SKIndex!, _ inTermID: CFIndex) -> Unmanaged<CFArray>!Parameters
- inIndex:
The index to search.
- inTermID:
The ID of the term to search for.
Return Value
An array of CFNumbers, each the ID for a document URL object that points to a document containing the search term.
Discussion
SKIndexCopyDocumentIDArrayForTermID searches a single index for documents that contain a given term. The search uses a term ID, not a term string. To get the ID of a term, use SKIndexGetTermIDForTermString(_:_:).
Term IDs are index-specific; that is, a term has a different ID in each index in which it appears. If you want to search for all the documents containing a term in a set of indexes, call this function in turn for each index, using the index-specific term ID in each case.
See Also
Working with Documents and Terms
SKDocumentCreateWithURL(_:)SKDocumentCreate(_:_:_:)SKDocumentCopyURL(_:)SKDocumentGetName(_:)SKDocumentGetParent(_:)SKDocumentGetSchemeName(_:)SKDocumentGetTypeID()SKIndexCopyDocumentForDocumentID(_:_:)SKIndexCopyInfoForDocumentIDs(_:_:_:_:_:)SKIndexCopyDocumentRefsForDocumentIDs(_:_:_:_:)SKIndexCopyDocumentURLsForDocumentIDs(_:_:_:_:)SKIndexCopyTermIDArrayForDocumentID(_:_:)SKIndexCopyTermStringForTermID(_:_:)SKIndexGetTermIDForTermString(_:_:)SKIndexSetDocumentProperties(_:_:_:)SKIndexCopyDocumentProperties(_:_:)SKIndexGetDocumentState(_:_:)SKIndexGetDocumentTermCount(_:_:)SKIndexGetDocumentTermFrequency(_:_:_:)SKIndexGetTermDocumentCount(_:_:)SKIndexGetDocumentID(_:_:)