<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreSpotlight",
  "identifier" : "/documentation/CoreSpotlight/CSSearchQueryContext",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Spotlight"
    ],
    "preciseIdentifier" : "c:objc(cs)CSSearchQueryContext"
  },
  "title" : "CSSearchQueryContext"
}
-->

# CSSearchQueryContext

The behavior configuration to use for a search query.

```
class CSSearchQueryContext
```

## Topics

### Configuring search behavior

[`fetchAttributes`](/documentation/CoreSpotlight/CSSearchQueryContext/fetchAttributes)

The attributes the system fetches for the searchable items.

[`keyboardLanguage`](/documentation/CoreSpotlight/CSSearchQueryContext/keyboardLanguage)

The language used for the query.

[`sourceOptions`](/documentation/CoreSpotlight/CSSearchQueryContext/sourceOptions-swift.property)

The query source options to allow or deny Mail messages in the search.

[`SourceOptions`](/documentation/CoreSpotlight/CSSearchQueryContext/SourceOptions-swift.struct)

The query source options to allow or deny Mail messages in the search.

### Filtering the results

[`filterQueries`](/documentation/CoreSpotlight/CSSearchQueryContext/filterQueries)

The query string used to filter the results.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherited By

[`CSUserQueryContext`](/documentation/CoreSpotlight/CSUserQueryContext)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)