meilisearch-rust icon indicating copy to clipboard operation
meilisearch-rust copied to clipboard

Content-Encoding

Open nbittich opened this issue 7 months ago • 0 comments

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"))

nbittich avatar May 20 '25 07:05 nbittich