$config = SearchConfig::create('YourApplicationID', 'YourAdminAPIKey');
$config->setConnectTimeout(integer connectTimeout);
$config->setReadTimeout(integer readTimeout);
$config->setWriteTimeout(integer writeTimeout);
SearchClient::createWithConfig($config);
About this method #
Override the pre-configured timeouts.
Network & DNS resolution can be slow. That is why we have pre-configured timeouts. We do not advise to change them, but it could make sense to change them in some special cases.
Note: Not all parameters are available for every language. See Parameters below.
Examples #
1
2
3
4
5
6
$config = SearchConfig::create('AJ0P3S7DWQ', '••••••••••••••••••••ce1181300d403d21311d5bca9ef1e6fb');
$config->setConnectTimeout(2);
$config->setReadTimeout(30);
$config->setWriteTimeout(30);
SearchClient::createWithConfig($config);
Parameters #
connectTimeout
# |
type: integer
default:
Optional
Timeout for the tcp session to connect. Only available for the following languages: javascript, php, python, ruby, java, android, go, scala. |
readTimeout
# |
type: integer
default:
Optional
Timeout for the read on the tcp socket. Available in all languages. |
writeTimeout
# |
type: integer
default:
Optional
Same as requestTimeout but applies only to write operations. Only available for the following languages: javascript, kotlin, csharp. |
hostDownDelay
# |
type: integer
default:
Optional
The expected period of time for a down host to get back up again. Impacts the time between API Client retries. Only available for the following languages: java, android, scala. |
dnsTimeout
# |
type: integer
default:
Optional
Timeout for the dns resolution. Only available for the following languages: csharp, scala. |
searchBatchTimeout
# |
type: integer
default:
Optional
Same as requestTimeout but applies only to batch operations. Only available for the following language: ruby. |
searchReadTimeout
# |
type: integer
default:
Optional
Same as requestTimeout but applies only to search operations. Only available for the following languages: php, python, ruby. |
requestTimeout
# |
type: integer
default:
Optional
HTTP timeout for the request. Only available for the following languages: ruby, android, swift, scala. |
Response #
No response