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