---
title: default()
framework: corespotlight
role: symbol
role_heading: Type Method
path: corespotlight/cssearchableindex/default()
---

# default()

Returns the default on-device index.

## Declaration

```swift
class func `default`() -> Self
```

## Mentioned in

Adding your app’s content to Spotlight indexes

## Return Value

Return Value The default on-device index.

## Discussion

Discussion The default index doesn’t protect data or support batch updates, so use it only during prototyping or testing your Spotlight features. In your production code, create named indexes using init(name:) or init(name:protectionClass:) instead of using this index for your content.

## See Also

### Creating an index

- [init(name:)](corespotlight/cssearchableindex/init(name:).md)
- [init(name:protectionClass:)](corespotlight/cssearchableindex/init(name:protectionclass:).md)
