Use null for FillArgs in Elastic Search account and group index

FillArgs are currently not used for indexing accounts and groups,
hence we can just provide null for the FillArgs. This makes the
handling of FillArgs consistent with the Lucene account and group
index, which also use null for FillArgs.

Change-Id: Ib66b9c6a2d7db5ee9841c14670d0da8086d40f34
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2017-01-13 14:55:48 +01:00
parent f2d9589fed
commit af216ac0e7
2 changed files with 4 additions and 6 deletions

View File

@@ -26,7 +26,6 @@ import com.google.gerrit.server.account.AccountCache;
import com.google.gerrit.server.account.AccountState;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.gerrit.server.config.SitePaths;
import com.google.gerrit.server.index.FieldDef.FillArgs;
import com.google.gerrit.server.index.IndexUtils;
import com.google.gerrit.server.index.QueryOptions;
import com.google.gerrit.server.index.Schema;
@@ -89,11 +88,11 @@ public class ElasticAccountIndex extends
@AssistedInject
ElasticAccountIndex(
@GerritServerConfig Config cfg,
FillArgs fillArgs,
SitePaths sitePaths,
Provider<AccountCache> accountCache,
@Assisted Schema<AccountState> schema) {
super(cfg, fillArgs, sitePaths, schema, ACCOUNTS_PREFIX);
// No parts of FillArgs are currently required, just use null.
super(cfg, null, sitePaths, schema, ACCOUNTS_PREFIX);
this.accountCache = accountCache;
this.mapping = new AccountMapping(schema);
this.queryBuilder = new ElasticQueryBuilder();

View File

@@ -24,7 +24,6 @@ import com.google.gerrit.reviewdb.client.AccountGroup;
import com.google.gerrit.server.account.GroupCache;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.gerrit.server.config.SitePaths;
import com.google.gerrit.server.index.FieldDef.FillArgs;
import com.google.gerrit.server.index.IndexUtils;
import com.google.gerrit.server.index.QueryOptions;
import com.google.gerrit.server.index.Schema;
@@ -88,11 +87,11 @@ public class ElasticGroupIndex
@AssistedInject
ElasticGroupIndex(
@GerritServerConfig Config cfg,
FillArgs fillArgs,
SitePaths sitePaths,
Provider<GroupCache> groupCache,
@Assisted Schema<AccountGroup> schema) {
super(cfg, fillArgs, sitePaths, schema, GROUPS_PREFIX);
// No parts of FillArgs are currently required, just use null.
super(cfg, null, sitePaths, schema, GROUPS_PREFIX);
this.groupCache = groupCache;
this.mapping = new GroupMapping(schema);
this.queryBuilder = new ElasticQueryBuilder();