dexter
dexter

Reputation: 462

Handling searches while transitioning from MySQL to elastic search?

I have a normal ec2 instance running elastic search , and synced up with mysql where data is imported from mysql into elasticsearch on a fixed interval .Approach used is to recreate index and reimport data after aa fixed interval . What approach could be taken to handle the search while the reindexing and reimporting activities a still running?

Import is being carried through jdbc importer .

Any insights or guidance would be highly appreciated .

Upvotes: 0

Views: 51

Answers (1)

Evaldas Buinauskas
Evaldas Buinauskas

Reputation: 14077

There's just one real way. You'd have to use aliases.

So that would be scenario:

  • You create index with some date indication. Let it be your_index-2015-11-23
  • You create an alias for it, let it be your_index
  • Monday comes, you create a new index with different name
  • You index data there
  • Remove alias from first indice, add it to newly created one.

More here: Index Aliases and Zero Downtime

Upvotes: 1

Related Questions