rename index in elasticsearch

Ads
Ads

rename index in elasticsearch


Java Coder
rename index in elasticsearch
1 Answer(s)      a month and 3 days ago
Posted in : Big Data
Ads

How to rename index in elasticsearch?

I have an index with millions of records in it. I want to rename this index to another name. There is some business requirement to rename it. What is the command to rename index in elasticsearch?

I am using Elasticsearch 6.1.

Thanks

View Answers

May 18, 2018 at 1:22 AM


Hi,

Elasticsearch does not allow to rename the index.

But you can copy index into another index and then delete old index.

Here is command to copy one index into another:

POST /_reindex
{
  "source": {
    "index": "oldindexname"
  },
  "dest": {
    "index": "new_indexname"
  }
}

Above command will copy index oldindexname into new_indexname.

Following command can bee used to delete index:

DELETE oldindexname

thanks


Ads









Related Tutorials/Questions & Answers:
rename the column in sql
rename the column in sql   How can i rename the column name in SQL
How to rename a file in Java?
How to rename a file in Java?  Hi, What is the code for renaming a file? How to rename a file in Java? Thanks   Hi, You can use the renameTo() method for renaming a file or directory. Check tutorial at Rename
Advertisements
rename before uploading
rename before uploading  I need to change (rename)the file name/image name before uploading it so that the file gets uploaded on server with this new name
rename project in iphone
rename project in iphone  hello, I have a lot of code that I've... to rename the project then tell me How can I rename my project and app in XCode...;Rename
Mysql Alter Rename Table
Mysql Alter Rename Table       Mysql Alter Rename Table is used to redefine and rename the existing... Alter Rename Table'. To understand this example we create a table 'employees
What is Index?
What is Index?  What is Index
How to rename MySQL table?
How to rename MySQL table? The designing and development of any software...;table name> rename <new table name> command can be used to rename... the table name. alter table account rename loan_account; The above command
FTPClient : Rename Remote File
In this tutorial, you will learn how to rename file on the server by using FTPClient class
PHP rename() function and examples
Syntax of PHP rename() Function bool rename(file_name,new_name[,context]) rename() function changes the name(renames)of the given file or the directory Example of PHP rename() Function Code for PHP rename() Function <
Mysql Alter Rename Column
Mysql Alter Rename Column       Mysql Alter Rename Column is used to modify the table definition and rename the existing column of table. Understand with Example
Mysql Alter Rename Table
Mysql Alter Rename Table       Mysql Alter Rename Table is used to modify and change the name... 'Mysql Alter Rename Table'. To grasp this example , we create a table employees
index of javaprogram
index of javaprogram  what is the step of learning java. i am not asking syllabus am i am asking the step of program to teach a pesonal student.   To learn java, please visit the following link: Java Tutorial
C file rename
C file rename       This section illustrates you to rename a file in C. You can see in the given... with HELLO.txt. For this, we have used the library function rename() which renames
Drop Index
Drop Index       Drop Index is used to remove one or more indexes from the current database. Understand with Example The Tutorial illustrate an example from Drop Index
Version of org.elasticsearch>elasticsearch dependency
List of Version of org.elasticsearch>elasticsearch dependency
Version of org.elasticsearch.distribution.zip>elasticsearch dependency
List of Version of org.elasticsearch.distribution.zip>elasticsearch dependency
clustered and a non-clustered index?
clustered and a non-clustered index?  What is the difference between clustered and a non-clustered index
Mysql Btree Index
Mysql Btree Index  Mysql BTree Index Which tree is implemented to btree index? (Binary tree or Bplus tree or Bminus tree
z-index always on top
z-index always on top  Hi, How to make my div always on top using the z-index property? Thanks   Hi, You can use the following code: .mydiv { z-index:9999; } Thanks
array, index, string
array, index, string  how can i make dictionary using array...please help
Rename the File or Directory in Java
Rename the File or Directory in Java   ... of doing so. Through this program you can easily rename any type of the file... name to rename the old file or directory which has to be renamed then the file
NSMutableArray change object at Index
NSMutableArray change object at Index   NSMutableArray change object at Index   // Browse all messages (you can use "for (NSDictionary *message in allMessageArray)" enumerate loop but because we need the index
$_GET[] index is not defined
$_GET[] index is not defined  Hi, What could be solution of the error: $_GET['someparameter'] index is not defined Thanks   Hi, You can use the following code: if (isset($_GET['someparameter'])) { // your code
Version of com.thesett>index dependency
List of Version of com.thesett>index dependency
Version of co.diji>elasticsearch-mocksolrplugin dependency
List of Version of co.diji>elasticsearch-mocksolrplugin dependency
Version of com.automattic>elasticsearch-statsd dependency
List of Version of com.automattic>elasticsearch-statsd dependency
Version of com.gu>elasticsearch-cloudwatch dependency
List of Version of com.gu>elasticsearch-cloudwatch dependency
Version of com.jeromeloisel>elasticsearch-crud dependency
List of Version of com.jeromeloisel>elasticsearch-crud dependency
Version of com.sonian>elasticsearch-equilibrium dependency
List of Version of com.sonian>elasticsearch-equilibrium dependency
Version of com.sonian>elasticsearch-jetty dependency
List of Version of com.sonian>elasticsearch-jetty dependency