Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot change index.refresh_interval in elasticesarch.yml file. #20584

Closed
BigBrain-Industries opened this issue Sep 20, 2016 · 3 comments
Closed

Comments

@BigBrain-Industries
Copy link

BigBrain-Industries commented Sep 20, 2016

Elasticsearch version: 2.4, 1.4.4

Plugins installed: [none]

JVM version: 1.8

OS version: Win 7 (64 bit)

Description of the problem including expected versus actual behavior:
I want to set the index.refresh_interval setting using puppet, so I need to do it in the elasticsearch.yml file. However, I noticed that elasticsearch doesn't respect this value, even though the docs say it should be possible (https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html). Note that I can call the update api (/_settings) and do it and it works that way, however, for puppet, it has to be done in the elasticsearch.yml file.
I noticed that I can change other settings in that file and it works (e.g. setting number of shards, replicas).
This also happened in 1.4.4.

Steps to reproduce:

  1. Download Elasticsearch 2.4
  2. set index.refresh_interval: -1 in elasticsearch.yml and start elasticsearch.
  3. created a new index
    1. looked up the settings, (curl ..../_settings)
    2. index.refresh_interval isn't there.
    3. Inserting a document is immediately searchable, even though the setting means it shouldn't be.
    4. calling curl -XPUT ../_settings 'index.refresh_interval: -1' works and immediately takes effect.
@clintongormley
Copy link

You are correct, this doesn't work. I'm surprised nobody has reported this before.

That said, index.* settings can no longer be set in the config file from Elasticsearch 5.0 onwards, so you'd be better off adjusting to the new approach already.

You could put the refresh interval into a template which matches all indices.

Given that config file support for these settings have been removed, I'm going to close this issue as won't fix.

@BigBrain-Industries
Copy link
Author

You could put the refresh interval into a template which matches all indices.

Can you clarify what you mean by this?
Also, according to your website, 2.4 is supported till 2018-02-28, so shouldn't this bug be fixed?

@jasontedor
Copy link
Member

Can you clarify what you mean by this?

You can use the index templates API to define a template that matches all indices ("*") that specifies an index setting for the desired refresh interval. When any index is created, it will match this template and will pick up the refresh interval.

Also, according to your [website], 2.4 is supported till 2018-02-28, so shouldn't this bug be fixed?

This does not mean that we fix every bug. The 2.x series has entered the stability phase of its lifecycle. Fixing the leniency in settings was a massive effort, backporting it from an actively developed line in 5.x to a stable line in 2.4 is just not going to happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants