Indexing deletes settings / snippets

Hello, We have a static app that gets rebuilt every 30 minutes via a cron job.

Every time a rebuilt is happening, it also updates its algolia search index. The problem is however, that every time this happens, the search snippets in the frontend are displayed as empty fields (<div class="ais-Snippet"></div>).
Copying over the settings from a index replica instantly brings back the desired search snippets so I guess while indexing the settings are wiped. We also tried setting the settings during the indexing / build process as follows but with no positive result:

indexName: 'index',
    settings: {
                    "hitsPerPage": 10,
                    "page": 0,
                    "analytics": false,
                    "attributesToRetrieve": "*",
                    "attributesToSnippet": "*:20",
                    "getRankingInfo": true,
                    "snippetEllipsisText": "…",
                    "responseFields": "*",

Is there any way to explain / prevent this? I cannot copy the settings manually in the algolia backend every 30 mins.


Hey there, here’s how to replace all objects: