You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
581: Feat support retry pattern on status code 502, 503, 504 r=curquiza a=Ja7ad
# Pull Request
## Related issue
Fixes#569
## What does this PR do?
- Add retry pattern logic in client as default can manage retry pattern via options.
## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?
Thank you so much for contributing to Meilisearch!
Co-authored-by: Javad <[email protected]>
There are many easy ways to [download and run a Meilisearch instance](https://www.meilisearch.com/docs/learn/getting_started/installation).
63
69
@@ -75,7 +81,7 @@ NB: you can also download Meilisearch from **Homebrew** or **APT** or even run i
75
81
76
82
## 🚀 Getting started
77
83
78
-
#### Add documents<!-- omit in toc -->
84
+
#### Add documents
79
85
80
86
```go
81
87
package main
@@ -114,7 +120,7 @@ func main() {
114
120
115
121
With the `taskUID`, you can check the status (`enqueued`, `canceled`, `processing`, `succeeded` or `failed`) of your documents addition using the [task endpoint](https://www.meilisearch.com/docs/reference/api/tasks).
116
122
117
-
#### Basic Search<!-- omit in toc -->
123
+
#### Basic Search
118
124
119
125
```go
120
126
package main
@@ -156,7 +162,7 @@ JSON output:
156
162
}
157
163
```
158
164
159
-
#### Custom Search<!-- omit in toc -->
165
+
#### Custom Search
160
166
161
167
All the supported options are described in the [search parameters](https://www.meilisearch.com/docs/reference/api/search#search-parameters) section of the documentation.
162
168
@@ -196,7 +202,7 @@ JSON output:
196
202
}
197
203
```
198
204
199
-
#### Custom Search With Filters<!-- omit in toc -->
205
+
#### Custom Search With Filters
200
206
201
207
If you want to enable filtering, you must add your attributes to the `filterableAttributes` index setting.
-`WithCustomClientWithTLS` enables TLS for the HTTP client.
249
+
-`WithAPIKey` sets the API key or master [key](https://www.meilisearch.com/docs/reference/api/keys).
250
+
-`WithContentEncoding` configures [content encoding](https://www.meilisearch.com/docs/reference/api/overview#content-encoding) for requests and responses. Currently, gzip, deflate, and brotli are supported.
251
+
-`WithCustomRetries` customizes retry behavior based on specific HTTP status codes (`retryOnStatus`, defaults to 502, 503, and 504) and allows setting the maximum number of retries.
252
+
-`DisableRetries` disables the retry logic. By default, retries are enabled.
This package guarantees compatibility with [version v1.x of Meilisearch](https://github.com/meilisearch/meilisearch/releases/latest), but some features may not be present. Please check the [issues](https://github.com/meilisearch/meilisearch-go/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3Aenhancement) for more info.
240
275
276
+
## ⚡️ Benchmark Performance
277
+
278
+
The Meilisearch client performance was tested in [client_bench_test.go](/client_bench_test.go).
0 commit comments