I upgraded my elasticsearch 1.3.2 to elasticsearch 2.3.2. All was well, but due to certain reasons I had to downgrade it back to 1.3.2. Now, I get to see only 5 shards per index. It used to be 8 shards per index.
I have no idea how this has happened. Can anyone tell me how to go back to having 8 shards per index?
I did try updating the elasticsearch.yml file with 8 (for the number of shards) and tried restarting everything. But it doesn't give me back my 8 shards. It just shows 5.
We just have one index in this cluster. The number of shards has always been 8. (Now, I wonder how they set it up so it could produce 8 shards. I see this set nowhere. Not even in the elasticsearch.yml file. Not even in bin/setenv.) After the upgrade-downgrade exercise I've done, the number of shards has dipped to 5. I've tried various things, like setting it up in the .yml file, using a template as you suggested. Nothing works!
I just need some direction as to how to go back to having 8 shards.
Something like that will work, sure. You'll have to recreate the index if you want to change the number of shards it has. That is a thing that is set at creation. You can use the reindex command to copy everything from the old index into the new index if you'd like.
What I haven't been able to understand is this: "To reindex all of the documents from the old index efficiently, use scan-and-scroll to retrieve batches of documents from the old index, and the bulk API to push them into the new index."
I did get the scroll ID. But how do I use it to insert documents into my new index using a curl command(in the bulk API to be specific)? I haven't found any examples of this. Can you help?
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.