<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSUserActivity/isEligibleForSearch",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSUserActivity(py)eligibleForSearch"
  },
  "title" : "isEligibleForSearch"
}
-->

# isEligibleForSearch

A Boolean value that indicates whether to add the activity to the on-device index.

```
var isEligibleForSearch: Bool { get set }
```

## Discussion

If you aren’t yet using App Intents and want to add your user activity objects to the Spotlight indexes,
set the value in this property to `true`. When this property is `true` and the user activity object
is current, Spotlight indexes the activity so it can appear in search results. Set this property to
`false` if you are already indexing <doc://com.apple.documentation/documentation/AppIntents/AppEntity>
types or don’t want Spotlight to include someone’s activity-related information in search results.
The default value of this property is `false`.

Add an activity object to the search index if it contains information a person might reasonably search
for later. For example, a restaurant finder app might index activity objects for each restaurant the
person views. Subsequent searches for restaurants using Spotlight can then include the restaurants
from your activity objects in the results. Index activity objects only to reflect the content that
people touch in your app, not as a substitute for indexing your app’s content using Spotlight.

> Important: Your app must maintain a strong reference to any activity objects you make eligible for search.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)