Skip to content

refresh_interval cannot be set to null (= let ES reset the value to the default) #2014

Closed
@tomsquest

Description

@tomsquest

🐛 Bug Report

Typescript issue.

It is not possible to set a refresh_interval to null using the typescript client.

null is allowed in Elastic to reset the value of a setting to its default.

To Reproduce

Steps to reproduce the behavior:

  await elastic.indices.putSettings({
    index: indexName,
    settings: {
      refresh_interval: null, // <---- Error: IndicesIndexSettingsKeys.refresh_interval?: Duration | undefined
    },
  });

Expected behavior

putSettings should accept a refresh_interval of null.

export interface IndicesIndexSettingsKeys {
   // ...lines skipped...

    refresh_interval?: Duration | null; /// <---- proposal

Your Environment

  • node version: 18
  • @elastic/elasticsearch: 8.0
  • os: Linux
  • Typescript: 5.2.2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions