Yes, it will work on Elasticsearch 2.x but not on 5.x (see discussion here: https://github.com/elastic/elasticsearch/issues/18073). This is an index-level setting and should be set on the index. If you want this to apply to all newly created indices as well, you should define an index template that applies this setting.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.