---
title: "SKIndexRemoveDocument(_:_:)"
framework: Core Services
role: symbol
role_heading: Function
platforms: [macOS 10.3+]
path: coreservices/1444375-skindexremovedocument
---

# SKIndexRemoveDocument(_:_:)

Removes a document URL object (of type SKDocument) and its children, if any, from an index.

## Declaration

```swift
func SKIndexRemoveDocument(_ inIndex: SKIndex!, _ inDocument: SKDocument!) -> Bool
```

## Parameters

- `inIndex`: The index from which you want to remove the document URL object (SKDocumentRef).
- `inDocument`: The document URL object to remove.

## Return Value

Return Value A Boolean value of true on success, or false on failure.

## Discussion

Discussion When your application deletes a document, use this function to update the index to reflect the change. 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.

## See Also

### Managing Indexes

- [SKIndexAddDocumentWithText(_:_:_:_:)](coreservices/1444518-skindexadddocumentwithtext.md)
- [SKIndexAddDocument(_:_:_:_:)](coreservices/1444897-skindexadddocument.md)
- [SKIndexFlush(_:)](coreservices/1450667-skindexflush.md)
- [SKIndexCompact(_:)](coreservices/1443628-skindexcompact.md)
- [SKIndexGetDocumentCount(_:)](coreservices/1449093-skindexgetdocumentcount.md)
- [SKIndexGetMaximumDocumentID(_:)](coreservices/1444628-skindexgetmaximumdocumentid.md)
- [SKIndexGetMaximumTermID(_:)](coreservices/1444278-skindexgetmaximumtermid.md)
- [SKIndexDocumentIteratorCreate(_:_:)](coreservices/1446189-skindexdocumentiteratorcreate.md)
- [SKIndexDocumentIteratorCopyNext(_:)](coreservices/1442212-skindexdocumentiteratorcopynext.md)
- [SKIndexDocumentIteratorGetTypeID()](coreservices/1443022-skindexdocumentiteratorgettypeid.md)
- [SKIndexGetAnalysisProperties(_:)](coreservices/1443461-skindexgetanalysisproperties.md)
- [SKIndexMoveDocument(_:_:_:)](coreservices/1449899-skindexmovedocument.md)
- [SKIndexRenameDocument(_:_:_:)](coreservices/1448935-skindexrenamedocument.md)
- [SKIndexSetMaximumBytesBeforeFlush(_:_:)](coreservices/1448696-skindexsetmaximumbytesbeforeflus.md)
- [SKIndexGetMaximumBytesBeforeFlush(_:)](coreservices/1445329-skindexgetmaximumbytesbeforeflus.md)
