setSettings not working

I am trying to apply setting for index index.setSettings{ranking: [“desc(id)”, “typo”, “geo”, “words”, “filters”, “proximity”, “attribute”, “exact”, “custom”]}), but it is doesn’t work. When i do this via dashboard, it is working fine.
const index = this._algoliaService.initIndex(“users”);
filters && (await index.setSettings(algoliaSettings(sort, filters)).wait());

@devs3 welcome to the community!

I tried out your configuration and it worked fine for me. I would try to catch the error from the setSettings call to see what the error is. We always return useful error messages which will help you track down the issue.

Ensure you are using your Admin API key - this is the main error I could see you running into. Your Search API key (the public one) does not have permission to modify the settings.

await index.setSettings({
    ranking: ["desc(id)", "typo", "geo", "words", "filters", "proximity", "attribute", "exact", "custom"]
})
    .catch(err => console.error(err))