meilisearch-rust
meilisearch-rust copied to clipboard
Content-Encoding
It seems there is no way of setting the content-encoding when adding documents as gzipped ndjson.
What the doc says:
Request compression The code sample below uses the Content-Encoding: gzip header, indicating that the request body is compressed using the gzip algorithm:
cat ~/movies.json | gzip | curl -X POST 'MEILISEARCH_URL/indexes/movies/documents' --data-binary @- -H 'Content-Type: application/json' -H 'Content-Encoding: gzip'
What I should be able to do(or similar):
search_client
.index(&ic.name)
.add_documents_ndjson(&documents[..], Some(INDEX_ID_KEY), Some("Content-Encoding: gzip"))