SKIndexOpenWithURL(_:_:_:)
Opens an existing, named index stored in a file whose location is specified with a CFURL object.
Declaration
func SKIndexOpenWithURL(_ inURL: CFURL!, _ inIndexName: CFString!, _ inWriteAccess: Bool) -> Unmanaged<SKIndex>!Parameters
- inURL:
The location of the index.
- inIndexName:
The name of the index. Can be
NULL, in which case this function attempts to open the index with the default name ofIADefaultIndex. - inWriteAccess:
A Boolean value indicating whether the index is open for updating. To open an index for searching only, pass
false(0orkCFBoolenFalse). To open it for searching and updating, passtrue(1orkCFBooleanTrue).
Return Value
The named index, or NULL on failure.
Discussion
If inIndexName is NULL and inData does not contain an index with the default name, this function returns NULL.
A call to SKIndexOpenWithURL retains the opened index. When your application no longer needs the index, dispose of it by calling SKIndexClose(_:).
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.
Special Considerations
You cannot use CFMakeCollectable with SKIndex objects.