---
title: DocumentIdentifier
framework: uikit
role: symbol
role_heading: Associated Type
path: uikit/uitextsearching-3wkjv/documentidentifier
---

# DocumentIdentifier

An object that uniquely identifies a specific document when searching for matching text across multiple documents.

## Declaration

```swift
associatedtype DocumentIdentifier : Hashable = AnyHashable?
```

## Discussion

Discussion The UITextSearching and UITextSearchAggregator protocols use this type to distinguish matches in a specific document from text in other documents with the same range.

## See Also

### Handling searches

- [performTextSearch(queryString:options:resultAggregator:)](uikit/uitextsearching-3wkjv/performtextsearch(querystring:options:resultaggregator:).md)
- [UITextSearchAggregator](uikit/uitextsearchaggregator-swift.struct.md)
- [compare(_:toRange:document:)](uikit/uitextsearching-3wkjv/compare(_:torange:document:).md)
- [compare(document:toDocument:)](uikit/uitextsearching-3wkjv/compare(document:todocument:).md)
