Home > Software engineering >  elastic reindex is very slow
elastic reindex is very slow

Time:09-27

elastic reindex is very slow. from some article refresh interval is default 1seconds and it required to change it to -1 and after reindex complete to update back to 1s. my question here is.. Is it good to update the refresh interval value to -1seconds when re index is running. which is already completed 20%.

curl -XPUT 'localhost:9200/my_index/_settings' -d ' { "index" : { "refresh_interval" : -1 } }

CodePudding user response:

It won't hurt if you do that, no

Also if you are using Elasticsearch 5 then you really need to urgently upgrade, it's been EOL for a number of years now

CodePudding user response:

The refresh_interval changes how frequently ElasticSearch syncs data and makes it available for search. This is additional work that is required when the refresh interval is reduced. When re-indexing, if you are not needing to query the new index, then you want to set this high to improve performance or even disable it.

https://www.elastic.co/guide/en/elasticsearch/reference/current/tune-for-indexing-speed.html

If you must read from the index while writing to it and must have the data available very quickly, indexing performance will be reduced.

  • Related