I am trying to reduce the storage used by elasticsearch. After reading the options available.
Looks like compression is by default enabled in elasticsearch 2.2.
But we can change the default to "best_compression".
When I am trying to run this command. It throws me an error.
I am trying to run this in different ways like
curl -XPOST ‘localhost:9200/twitter’ -d ‘{“settings”: {“index.codec”: “best_compression”}}’
I am running this from terminal "Workstation:~/ELK/elasticsearch-2.2.0$"
Getting the following error
"""
curl: (6) Could not resolve host: xn--localhost-499d
curl: (3) [globbing] unmatched brace in column 1
curl: (3) [globbing] unmatched close brace/bracket in column 23
"""
curl: (6) Could not resolve host: xn--localhost-499d
It looks like Microsoft Office or similar quote-damaged your command. Make sure the quotes are plain ASCII straight quotes. Comparison between your command and what it should look like:
Can I somehow put these settings in the elasticsearch.yml or elasticsearch.cfg file? So that everytime I create a new index, I don't have to do it manually.
Also, regarding the types of various fields, by default it takes it as "string". I can specify the types using templates, but again, can I automate for everytime I add a new node in the cluster?
Can I somehow put these settings in the elasticsearch.yml or elasticsearch.cfg file? So that everytime I create a new index, I don't have to do it manually.
Use an index template.
Also, regarding the types of various fields, by default it takes it as "string". I can specify the types using templates, but again, can I automate for everytime I add a new node in the cluster?
Index templates are cluster-wide so there's nothing to automate.
(This isn't true for index templates placed in the file system of each node, but that method was removed in ES 2.0.)
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.