public static @NotNull Query<PsiReference> search(@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)));
  }
public static @NotNull Query<PsiReference> search(@NotNull SearchParameters parameters)