The Client
constructor can take the following parameters:
url
: the URL to reach the Meilisearch server.api_key
(optional): the API key to access the Meilisearch server.options
(optional): to set a custom timeout
(default: 1s
) or a maximum number of retries with max_retries
(default: 0
).Here is the basic way to use the Client
:
client = MeiliSearch::Client.new($URL, $API_KEY)
The default timeout is 1 second. You might need to increase this timeout to complete larger indexing requests:
MeiliSearch::Client.new($URL, $MASTER_KEY, timeout: 10) # or MeiliSearch::HTTPRequest.default_timeout(10)
To set a number of retries:
client = MeiliSearch::Client.new($URL, $MASTER_KEY, max_retries: 2)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4