Base group index on new class InternalGroup

To be able to add the members and sub-groups of a group to the group
index, we need a class which contains those additional details. For
this reason, we introduce a new class InternalGroup and base the
group index on it (instead of AccountGroup).

Change-Id: I88b1a0bf1bd06804069a2a3165e7664db7900903
This commit is contained in:
Alice Kober-Sotzek
2017-08-18 15:04:33 +02:00
parent e7f5e1975f
commit e23b34a206
25 changed files with 326 additions and 106 deletions

View File

@@ -27,8 +27,8 @@ import com.google.gerrit.elasticsearch.ElasticAccountIndex.AccountMapping;
import com.google.gerrit.elasticsearch.ElasticChangeIndex.ChangeMapping;
import com.google.gerrit.elasticsearch.ElasticGroupIndex.GroupMapping;
import com.google.gerrit.index.Schema;
import com.google.gerrit.reviewdb.client.AccountGroup;
import com.google.gerrit.server.account.AccountState;
import com.google.gerrit.server.group.InternalGroup;
import com.google.gerrit.server.index.IndexModule.IndexType;
import com.google.gerrit.server.index.account.AccountSchemaDefinitions;
import com.google.gerrit.server.index.change.ChangeSchemaDefinitions;
@@ -146,7 +146,7 @@ final class ElasticTestUtils {
.execute()
.actionGet();
Schema<AccountGroup> groupSchema = GroupSchemaDefinitions.INSTANCE.getLatest();
Schema<InternalGroup> groupSchema = GroupSchemaDefinitions.INSTANCE.getLatest();
GroupMapping groupMapping = new GroupMapping(groupSchema);
nodeInfo
.node