elasticsearch: Cannot index large snippets
Observed while working on https://gitlab.com/gitlab-org/gitlab-ee/issues/11419
To bulk-import snippets, we use
rake gitlab:elastic:index_snippets and the
es_import helper. This reliably times out on staging.gitlab.com
It looks like the problem occurs when a batch contains a large-enough snippet. At least one in the database is ~5MiB in size.
I'd suggest we exclude or truncate the content for larger snippets. More generally, do we have size limits on snippets? Should we?