]> git.ipfire.org Git - thirdparty/bugzilla.git/commit
Bug 1381869 - Use separate elasticsearch index for Bugzilla::User
authorDylan William Hardison <dylan@hardison.net>
Thu, 20 Jul 2017 20:36:56 +0000 (16:36 -0400)
committerGitHub <noreply@github.com>
Thu, 20 Jul 2017 20:36:56 +0000 (16:36 -0400)
commitda9c617eb5d8345409386b85b5d8c167fc0c55d7
tree0938a7253553df05d30df952d6fc2b6e1393743b
parent608ec172071f5adfe8eba9c83d42668520a2baea
Bug 1381869 - Use separate elasticsearch index for Bugzilla::User

This patch removes the concept of a single, bugzilla-wide index in favor of a
per-class index. bugs and comments continue to use
Bugzilla->params->{elasticsearch_index} but users use
Bugzilla->params->{elasticsearch_index} . "_user".

It is assured via the ChildObject trait (role) that comments will share the
index with bugs, and we have kept the index for bugs/comments the same to avoid
the multi-hour reindexing of production. Re-indexing users takes only five
minutes.

Subsequent work on this will allow use to version the index names and use
aliases, but I wanted to keep this patch small.

This patch also corrects some mistakes

1. $indexer->put_mapping() should not have been a public method.
2. Time::HiRes should be imported at the top of the file, not in a sub.
Bugzilla/Bug.pm
Bugzilla/Comment.pm
Bugzilla/Elastic.pm
Bugzilla/Elastic/Indexer.pm
Bugzilla/Elastic/Role/ChildObject.pm
Bugzilla/Elastic/Role/HasIndexName.pm [deleted file]
Bugzilla/Elastic/Role/Object.pm
Bugzilla/Elastic/Search.pm
Bugzilla/User.pm
scripts/bulk_index.pl