add support for non-destructive elasticsearch reindexing



7 years ago
7 years ago


(Reporter: willkg, Assigned: willkg)



Firefox Tracking Flags

(Not tracked)


(Whiteboard: u=dev c=search p=1)

In admin/search, there's a button for reindexing. If you press the button, it _deletes_ the existing WRITE_INDEX, then creates a new one with the mappings.

We additionally need a reindexing that's non-destructive. One that allows us to reindex all the data, but doesn't nix the index and recreate it. This would be used for all the changes that don't involve changing the mapping. Things like synonyms, adjustments to data, ...

This bug is for creating the button in the admin form and the non-destructive reindexing mode.
I want to get this done for 2012.10. I'm pretty sure it's straightforward and just requires some minor adjustments and a flag. Also, I think I've implemented this before, but ripped it out because we thought we wouldn't really need it.

So, I suspect this is a 2 pointer mostly because it takes a while to test reindexing changes since it takes a while to index. If I did the parallel reindexing bug first, then this would probably take less time.
Target Milestone: --- → 2012.10
Grabbing this one.

django-haystack does this all on the command line. They have the following commands:

* rebuild_index
* update_index

I think I'm going to emulate that.

Given that, the changes required here are:

* change cli esreindex -> es_rebuild_index
* create cli es_update_index which does a non-destructive reindexing
* change "reindex <index-name>" button on admin/search to "rebuild index <index-name>"
* add "update index <index-name>" button to admin/search
* rework the reindexing code to handle destructive and non-destructive versions

I still think this is a 2 point bug. The actual work isn't hard to do, but it'll take a while to do it.
Assignee: nobody → willkg
Making this a P1. It's important that we get this done so that we can do synonym and non-mapping changes live.
Priority: -- → P1
I'm making this a 1 point bug. Most of the work is done already and at this point it's just a flag.
Whiteboard: u=dev c=search p=1
Ricky just pushed this to production. SWEET!
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.