mirror of
https://github.com/hanzoai/search-go.git
synced 2026-10-30 18:22:58 +00:00
Per @ElyarSadig and @coderabbitai review on #780: - Drop *DocumentsQuery parameter (endpoint takes no query params) - Add dst interface{} parameter; require non-nil pointer to a slice (validated via reflect) - Verify Content-Type starts with application/x-ndjson, returning a clear error otherwise - Stream-decode NDJSON line-by-line via bufio.Scanner; never materialize the full body (avoids ~2x peak memory on large tasks) - Wire content-encoding for gzip/deflate/brotli responses - Move implementation out of meilisearch.go into task_documents.go - Update interface, integration test, code sample, and regenerate mockery mocks - Add unit tests covering destination validation, content-type enforcement, NDJSON decoding, and encoded responses