SKIndexGetTermDocumentCount(_:_:)
Gets the number of documents containing a given term represented in an index.
Declaration
func SKIndexGetTermDocumentCount(_ inIndex: SKIndex!, _ inTermID: CFIndex) -> CFIndexParameters
- inIndex:
The index containing the text of the documents you want to examine.
- inTermID:
The terms whose occurrences you want to know.
Return Value
A CFIndex object containing the number of documents represented in an index that contain a given term.
Discussion
If you want to know in which documents a term appears across multiple indexes, call this function separately on each index. Before querying each index, get the index-specific term ID using SKIndexGetTermIDForTermString(_:_:).
To ensure that this function takes into account document URL objects (of type SKDocument) recently added to indexes, call SKIndexFlush(_:) on each index before calling this function.
See Also
Working with Documents and Terms
SKDocumentCreateWithURL(_:)SKDocumentCreate(_:_:_:)SKDocumentCopyURL(_:)SKDocumentGetName(_:)SKDocumentGetParent(_:)SKDocumentGetSchemeName(_:)SKDocumentGetTypeID()SKIndexCopyDocumentForDocumentID(_:_:)SKIndexCopyInfoForDocumentIDs(_:_:_:_:_:)SKIndexCopyDocumentRefsForDocumentIDs(_:_:_:_:)SKIndexCopyDocumentURLsForDocumentIDs(_:_:_:_:)SKIndexCopyDocumentIDArrayForTermID(_:_:)SKIndexCopyTermIDArrayForDocumentID(_:_:)SKIndexCopyTermStringForTermID(_:_:)SKIndexGetTermIDForTermString(_:_:)SKIndexSetDocumentProperties(_:_:_:)SKIndexCopyDocumentProperties(_:_:)SKIndexGetDocumentState(_:_:)SKIndexGetDocumentTermCount(_:_:)SKIndexGetDocumentTermFrequency(_:_:_:)SKIndexGetDocumentID(_:_:)