# PlatformStorage.GlobalSearchContext.Builder

Artifact: [androidx.appsearch:appsearch-platform-storage](https://developer.android.com/jetpack/androidx/releases/appsearch) [View Source](https://cs.android.com/search?q=file:androidx/appsearch/platformstorage/PlatformStorage.java+class:androidx.appsearch.platformstorage.PlatformStorage.GlobalSearchContext.Builder) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

*** ** * ** ***


```
class PlatformStorage.GlobalSearchContext.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/kotlin/androidx/appsearch/platformstorage/PlatformStorage.GlobalSearchContext` objects.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/platformstorage/PlatformStorage.GlobalSearchContext.Builder#Builder(android.content.Context)(context: https://developer.android.com/reference/android/content/Context.html)` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/platformstorage/PlatformStorage.GlobalSearchContext` | `https://developer.android.com/reference/kotlin/androidx/appsearch/platformstorage/PlatformStorage.GlobalSearchContext.Builder#build()()` Builds a `https://developer.android.com/reference/kotlin/androidx/appsearch/platformstorage/PlatformStorage.GlobalSearchContext` instance. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/platformstorage/PlatformStorage.GlobalSearchContext.Builder` | `https://developer.android.com/reference/kotlin/androidx/appsearch/platformstorage/PlatformStorage.GlobalSearchContext.Builder#setWorkerExecutor(java.util.concurrent.Executor)(executor: https://developer.android.com/reference/java/util/concurrent/Executor.html)` Sets the worker executor associated with `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GlobalSearchSession`. |

## Public constructors

### Builder

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
Builder(context: Context)
```

## Public functions

### build

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
fun build(): PlatformStorage.GlobalSearchContext
```

Builds a `https://developer.android.com/reference/kotlin/androidx/appsearch/platformstorage/PlatformStorage.GlobalSearchContext` instance.

### setWorkerExecutor

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
fun setWorkerExecutor(executor: Executor): PlatformStorage.GlobalSearchContext.Builder
```

Sets the worker executor associated with `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GlobalSearchSession`.

If an executor is not provided, the AppSearch default executor will be used.

| Parameters |
|---|---|
| `executor: https://developer.android.com/reference/java/util/concurrent/Executor.html` | the worker executor used to run heavy background tasks. |