How can I swap indexes?


(Patrick Collins) #1

Hi everyone. I am working on an application that has an extremely large production database. On occasion, I need to test things locally with real data, so I during these times, I switch to a copy of my production database. The problem is, my local environment elasticsearch does not have this data indexed, and doing this indexing takes a long time.

I would like a way to easily be able to switch between indexes from my regular development database, and my cloned production database. I was wondering if anyone knows where the index file is stored and if this could be just as simple as moving files back and forth?

Thanks!


(Nik Everett) #2

Maybe the snapshot/restore feature would be better here. You could just index them both and leave the one you don't want to work with closed but I understand if you want to be super careful about not deleting it.


#3

Have you tried using aliases?

Have you had a look at: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html ?

Andrew


(Patrick Collins) #4

Hi Andrew,

Thanks for the alias suggestion...

Another thing I want to be able to do is make this accessible to other members on my team.. So that's why I was hoping there was just some elastic search file somewhere that could be copied to multiple computers so that anyone using this production copy would be able to instantly have an elastic search index to use... ?


(system) #5