---
title: "init(currentSuggestion:)"
framework: corespotlight
role: symbol
role_heading: Initializer
path: "corespotlight/csuserquerycontext/init(currentsuggestion:)"
---

# init(currentSuggestion:)

Creates a new query context object with an optional suggested search string.

## Declaration

```swift
init(currentSuggestion: CSSuggestion?)
```

## Parameters

- `currentSuggestion`: The suggested text completion that the person selected in your interface. Specify nil if the person hasn’t chosen a suggestion.

## Return Value

Return Value An initialized user query context object. Configure the properties of the returned object and use it to construct a CSUserQuery object.
