Query<PsiReference> (@NotNull SearchParameters parameters) { Query<PsiReference> result = INSTANCE.createQuery(parameters); if (parameters.isSharedOptimizer) { return uniqueResults(result); } SearchRequestCollector requests = parameters.getOptimizer(); return uniqueResults(new MergeQuery<>(result, new SearchRequestQuery(parameters.getProject(), requests))); }