Manually copying an index?


(maho) #1

Hi,

is it possible create a new index an copying the index data from the
index folder in the filesystem of index a to index b?

Thanks.


(Clinton Gormley) #2

On Fri, 2011-06-10 at 02:54 -0700, maho wrote:

Hi,

is it possible create a new index an copying the index data from the
index folder in the filesystem of index a to index b?

It is, but you'd need to script it yourself.

See for instance:

http://blogs.perl.org/users/clinton_gormley/2011/04/elasticsearchpm-v036-now-with-extra-sugar.html

clint


(maho) #3

Thanks for your answer.

Isn't it possible to copy the index in the filesystem because that
will be much faster.

On 10 Jun., 14:03, Clinton Gormley clin...@iannounce.co.uk wrote:

On Fri, 2011-06-10 at 02:54 -0700, maho wrote:

Hi,

is it possible create a new index an copying the index data from the
index folder in the filesystem of index a to index b?

It is, but you'd need to script it yourself.

See for instance:

http://blogs.perl.org/users/clinton_gormley/2011/04/elasticsearchpm-v...

clint


(Clinton Gormley) #4

On Fri, 2011-06-10 at 05:09 -0700, maho wrote:

Thanks for your answer.

Isn't it possible to copy the index in the filesystem because that
will be much faster.

I don't think so. You used to be able to do that. It required an update
to the mappings file with a text editor, but that file is no longer
text.

clint


(maho) #5

Do I also update the mapping file if i want to use the exact same
mapping configuration in the new index?

Or is there stored something like the core name or path to index?

On 10 Jun., 14:12, Clinton Gormley clin...@iannounce.co.uk wrote:

On Fri, 2011-06-10 at 05:09 -0700, maho wrote:

Thanks for your answer.

Isn't it possible to copy the index in the filesystem because that
will be much faster.

I don't think so. You used to be able to do that. It required an update
to the mappings file with a text editor, but that file is no longer
text.

clint


(Clinton Gormley) #6

On Fri, 2011-06-10 at 05:21 -0700, maho wrote:

Do I also update the mapping file if i want to use the exact same
mapping configuration in the new index?

Or is there stored something like the core name or path to index?

Perhaps I haven't understood what you are trying to achieve. Are you
trying to create a new index as a copy of the old index so that you have
old_index and new_index, or are you trying to move your data from one
location in the file system to another?

If the latter, then you can just move the data directory and point to
the new location:

http://www.elasticsearch.org/guide/reference/setup/dir-layout.html

If the former, then you're going to have to use the API to copy the
index

clint


(system) #7