Gets the total number of documents represented in an index.
- macOS 10.3+
- Core Services
The index whose document URL objects (of type
SKDocument) you want to count.
CFIndex object containing the number of document URL objects (of type
SKDocument) in the index. On failure, returns 0.
Document URL objects (of type
SKDocument) added to an index have an indexing state of
k. See the
Search Kit is thread-safe. You can use separate indexing and searching threads. Your application is responsible for ensuring that no more than one process is open at a time for writing to an index.
In the current implementation of Search Kit,
SKIndex returns the number of documents represented in the on-disk index. If your application has added document URL objects to the index but has not yet called
SKIndex, the document count may not be correct.