Source:
private void initIndex(final ObjectMapper mapper) { final Collection<Class<?>> types = newHashSet(); types.add(CDOMainBranchImpl.class); types.add(CDOBranchImpl.class); types.add(InternalBranch.class); types.add(Review.class); types.add(ReviewImpl.class); types.add(ConceptChanges.class); types.add(ConceptChangesImpl.class); types.add(CodeSystemEntry.class); types.add(CodeSystemVersionEntry.class); types.addAll(getToolingTypes(toolingId)); types.add(CommitInfoDocument.class); final Map<String, Object> settings = initIndexSettings(); final IndexClient indexClient = Indexes.createIndexClient(repositoryId, mapper, new Mappings(types), settings); final Index index = new DefaultIndex(indexClient); final Provider<BranchManager> branchManager = provider(BranchManager.class); final RevisionIndex revisionIndex = new DefaultRevisionIndex(index, new RevisionBranchProvider() { @Override public RevisionBranch getBranch(String branchPath) { final InternalCDOBasedBranch branch = (InternalCDOBasedBranch) branchManager.get().getBranch(branchPath); final Set<Integer> segments = newHashSet(); segments.addAll(branch.segments()); segments.addAll(branch.parentSegments()); return new RevisionBranch(branchPath, branch.segmentId(), segments); } @Override public RevisionBranch getParentBranch(String branchPath) { final InternalCDOBasedBranch branch = (InternalCDOBasedBranch) branchManager.get().getBranch(branchPath); return new RevisionBranch(branch.parent().path(), Ordering.natural().max(branch.parentSegments()), branch.parentSegments()); } }); bind(Index.class, index); bind(RevisionIndex.class, revisionIndex); index.admin().create(); getDelegate().services().registerService(Searcher.class, indexClient.searcher()); }

Target:
private void initIndex(final ObjectMapper mapper) { final Collection<Class<?>> types = newHashSet(); types.add(CDOMainBranchImpl.class); types.add(CDOBranchImpl.class); types.add(InternalBranch.class); types.add(Review.class); types.add(ReviewImpl.class); types.add(ConceptChanges.class); types.add(ConceptChangesImpl.class); types.add(CodeSystemEntry.class); types.add(CodeSystemVersionEntry.class); types.addAll(getToolingTypes(toolingId)); types.add(CommitInfoDocument.class); final Map<String, Object> settings = initIndexSettings(); final IndexClient indexClient = Indexes.createIndexClient(repositoryId, mapper, new Mappings(types), settings); final Index index = new DefaultIndex(indexClient); final Provider<BranchManager> branchManager = provider(BranchManager.class); final RevisionIndex revisionIndex = new DefaultRevisionIndex(index, new RevisionBranchProvider() { @Override public RevisionBranch getBranch(String branchPath) { final InternalCDOBasedBranch branch = (InternalCDOBasedBranch) branchManager.get().getBranch(branchPath); final Set<Integer> segments = newHashSet(); segments.addAll(branch.segments()); segments.addAll(branch.parentSegments()); return new RevisionBranch(branchPath, branch.segmentId(), segments); } @Override public RevisionBranch getParentBranch(String branchPath) { final InternalCDOBasedBranch branch = (InternalCDOBasedBranch) branchManager.get().getBranch(branchPath); return new RevisionBranch(branch.parent().path(), Ordering.natural().max(branch.parentSegments()), branch.parentSegments()); } }); bind(Index.class, index); bind(RevisionIndex.class, revisionIndex); index.admin().create(); }