# How can I distribute search jobs across multiple queues?

You can use the `setQueueResolver()` method to distribute search jobs across multiple queues:

For example, let's say you have 10 search queues you want to utilise, you could distribute search jobs between them randomly:

```php
\Aero\Search\Jobs\SearchJob::setQueueResolver(function () {
    return 'search-' . rand(1, 10);
});
```

Or equally:

```php
protected static $queueIndex = 0;

public function boot()
{
    \Aero\Search\Jobs\SearchJob::setQueueResolver(function () {
        return 'search-' . (self::$queueIndex++ % 10 + 1);
    });
}
```

<p class="callout info">The examples will dispatch the search jobs on queues from `search-1` to `search-10`.</p>