Store string fields only as "keyword" type
Elasticsearch usually stores strings three times. Once as type "keyword" and once as type "text" (source). And a third copy in the doc_values column store which is used for aggregations.
Focusing on the keyword and text copies, keyword is optimized for exact matches, whereas text is intended for fuzzy matches.
Chances are we only need fuzzy search for a few use cases. And many of those could potentially even be addressed differently.
We should look at our schema (mappings) and look for opportunities to eliminate text columns. Especially on the large indexes this could bring some pretty big savings.
Some methods for schema analysis: https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/10134#note_340145903.
Keyword data type: https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html.
refs https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/10094