Rename an index


(Tarek Ziadé) #1

Hey

Is there a way to rename (or copy) an index from the APIs ? -- not an
alias.

Thanks
Tarek

--


(Benoît) #2

To my knowledge, there is no "rename" or "copy" API.

For copy, you can search for scroll and scan API to iterate over all docs
and index them in a new index.

Benoît

On Monday, October 29, 2012 12:12:53 PM UTC+1, Tarek Ziadé wrote:

Hey

Is there a way to rename (or copy) an index from the APIs ? -- not an
alias.

Thanks
Tarek

--


(vineeth mohan) #3

A better option would be to maintain aliases -
http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases.html

Thanks
Vineeth

On Mon, Oct 29, 2012 at 9:18 PM, Benoît benoit.intrw@gmail.com wrote:

To my knowledge, there is no "rename" or "copy" API.

For copy, you can search for scroll and scan API to iterate over all docs
and index them in a new index.

Benoît

On Monday, October 29, 2012 12:12:53 PM UTC+1, Tarek Ziadé wrote:

Hey

Is there a way to rename (or copy) an index from the APIs ? -- not an
alias.

Thanks
Tarek

--

--


(Tarek Ziadé) #4

On Monday, October 29, 2012 4:48:47 PM UTC+1, Benoît wrote:

To my knowledge, there is no "rename" or "copy" API.

For copy, you can search for scroll and scan API to iterate over all docs
and index them in a new index.

Yeah I will try that. It sounds suboptimal though, maybe I should post a
feature request.

Thanks

--


(Tarek Ziadé) #5

On Tuesday, October 30, 2012 3:56:23 AM UTC+1, Vineeth Mohan wrote:

A better option would be to maintain aliases -
http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases.html

Thanks
Vineeth

That's what we do now - but I have an existing instance with some indexes I
wanted to copy over.

On Mon, Oct 29, 2012 at 9:18 PM, Benoît <benoit...@gmail.com <javascript:>

wrote:

To my knowledge, there is no "rename" or "copy" API.

For copy, you can search for scroll and scan API to iterate over all docs
and index them in a new index.

Benoît

On Monday, October 29, 2012 12:12:53 PM UTC+1, Tarek Ziadé wrote:

Hey

Is there a way to rename (or copy) an index from the APIs ? -- not an
alias.

Thanks
Tarek

--

--


(Clinton Gormley) #6

On Tue, 2012-10-30 at 02:06 -0700, Tarek Ziadé wrote:

On Tuesday, October 30, 2012 3:56:23 AM UTC+1, Vineeth Mohan wrote:
A better option would be to maintain aliases -
http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases.html

    Thanks
              Vineeth

That's what we do now - but I have an existing instance with some
indexes I wanted to copy over.

Ah, you can import dangling indices into a cluster. The problem is when
they have the same name as existing indices.

I opened this issue about exactly that problem:

clint

--


(system) #7