---
title: "SKIndexMoveDocument(_:_:_:)"
framework: Core Services
role: symbol
role_heading: Function
platforms: [macOS 10.3+]
path: coreservices/1449899-skindexmovedocument
---

# SKIndexMoveDocument(_:_:_:)

Changes the parent of a document URL object (of type SKDocument) in an index.

## Declaration

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

## Parameters

- `inIndex`: The index containing the document URL object you want to move.
- `inDocument`: The document URL object you want to move.
- `inNewParent`: The new parent document URL object for the document URL object you want to move.

## Return Value

Return Value A Boolean value of true for a successful move, or false on failure.

## Discussion

Discussion When your application moves 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)
- [SKIndexRemoveDocument(_:_:)](coreservices/1444375-skindexremovedocument.md)
- [SKIndexRenameDocument(_:_:_:)](coreservices/1448935-skindexrenamedocument.md)
- [SKIndexSetMaximumBytesBeforeFlush(_:_:)](coreservices/1448696-skindexsetmaximumbytesbeforeflus.md)
- [SKIndexGetMaximumBytesBeforeFlush(_:)](coreservices/1445329-skindexgetmaximumbytesbeforeflus.md)
