Initial implementation extracted from Gerrit stable-3.5
Files removed from Gerrit core in Change Ib7b5167ce2
and added to a separate project, packaged as libModule.

Having an external libModule allows Gerrit core to be
independent from ElasticSearch and, at the same time,
allow existing users to keep their setup without having
to migrate their indexes.

Original-Author: Alice Kober-Sotzek <aliceks@google.com>
Original-Author: Dave Borowitz <dborowitz@google.com>
Original-Author: David Ostrovsky <david@ostrovsky.org>
Original-Author: David Pursehouse <dpursehouse@collab.net>
Original-Author: David Pursehouse <dpursehouse@digital.ai>
Original-Author: Dmitrii Filippov <dmfilippov@google.com>
Original-Author: Dyrone Teng <dyroneteng@gmail.com>
Original-Author: Edwin Kempin <ekempin@google.com>
Original-Author: Gal Paikin <paiking@google.com>
Original-Author: Han-Wen Nienhuys <hanwen@google.com>
Original-Author: Hugo Arès <hugo.ares@ericsson.com>
Original-Author: Jacek Centkowski <jcentkowski@collab.net>
Original-Author: Joerg Zieren <zieren@google.com>
Original-Author: Marco Miller <marco.miller@ericsson.com>
Original-Author: Marija Savtchouk <mariasavtchouk@google.com>
Original-Author: Maxime Guerreiro <maximeg@google.com>
Original-Author: Paladox <thomasmulhall410@yahoo.com>
Original-Author: Pat Long <pllong@arista.com>
Original-Author: Patrick Hiesel <hiesel@google.com>
Original-Author: Sven Selberg <svense@axis.com>
Change-Id: I25586488ff7044ab4f05e2357cd272e9fb661a69
59 files changed
tree: ab0dabbb1e97e1c187aaaf082224df0c969086eb
  1. src/
  2. BUILD
  3. external_plugin_deps.bzl
  4. Jenkinsfile
  5. LICENSE
  6. README.md
README.md

Index backend for Gerrit, based on ElasticSearch

Indexing backend libModule for Gerrit Code Review based on ElasticSearch.

This module was original part of Gerrit core and then extracted into a separate component from v3.5.0-rc3 as part of Change-Id: Ib7b5167ce.

How to build

This libModule is built like a Gerrit in-tree plugin, using Bazelisk. See the build instructions for more details.

Setup

  • Install index-elasticsearch module

Install the index-elasticsearch.jar into the $GERRIT_SITE/lib directory.

Add the index-elasticsearch module to $GERRIT_SITE/etc/gerrit.config as follows:

[gerrit]
  installIndexModule = com.google.gerrit.elasticsearch.ElasticIndexModule

When installing the module on Gerrit replicas, use following example:

[gerrit]
  installIndexModule = com.google.gerrit.elasticsearch.ReplicaElasticIndexModule

For further information and supported options, refer to config documentation.

Integration test

Gerrit acceptance tests allow the execution with an alternate implementation of the indexing backend using the GERRIT_INDEX_MODULE environment variable.

bazel test --test_env=GERRIT_INDEX_MODULE=com.google.gerrit.elasticsearch.ElasticIndexModule //...