File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
server/src/main/java/org/elasticsearch/search/crossproject Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,17 @@ public String originProjectAlias() {
5555
5656 public Set <String > allProjectAliases () {
5757 // TODO consider caching this
58+ return allProjects ().map (ProjectRoutingInfo ::projectAlias ).collect (Collectors .toUnmodifiableSet ());
59+ }
60+
61+ /**
62+ * Stream containing all project infos, including origin and linked projects
63+ */
64+ public Stream <ProjectRoutingInfo > allProjects () {
5865 return Stream .concat (
5966 originProject != null ? Stream .of (originProject ) : Stream .empty (),
6067 linkedProjects != null ? linkedProjects .stream () : Stream .empty ()
61- ). map ( ProjectRoutingInfo :: projectAlias ). collect ( Collectors . toUnmodifiableSet ()) ;
68+ );
6269 }
6370
6471 // TODO: Either change the definition or the method name since it allows targeting only the origin project without any remotes
You can’t perform that action at this time.
0 commit comments