@Override
  public @NotNull <K, V> Iterator<VirtualFile> getContainingFilesIterator(@NotNull ID<K, V> indexId,
                                                                          @NotNull K dataKey,
                                                                          @NotNull GlobalSearchScope scope) {
    Project project = scope.getProject();
    try (var trace = lookupEntriesStarted(indexId)) {
      trace.keysWithAND(1)
        .withProject(project);

      if (project instanceof LightEditCompatible) return Collections.emptyIterator();
      @Nullable Iterator<VirtualFile> restrictToFileIt = extractSingleFileOrEmpty(scope);
      if (restrictToFileIt != null) {
        VirtualFile restrictToFile = restrictToFileIt.hasNext() ? restrictToFileIt.next() : null;
        if (restrictToFile == null) return Collections.emptyIterator();
        return !processValuesInOneFile(indexId, dataKey, restrictToFile, scope, (f, v) -> false) ?
               Collections.singleton(restrictToFile).iterator() : Collections.emptyIterator();
      }

      IdFilter filter = extractIdFilter(scope, project);
      IntPredicate accessibleFileFilter = getAccessibleFileIdFilter(project);

      IntSet fileIds = processExceptions(indexId, null, scope, index -> {
        IntSet fileIdsInner = new IntOpenHashSet();
        trace.totalKeysIndexed(keysCountApproximatelyIfPossible(index));
        index.getData(dataKey).forEach((id, value) -> {
          ProgressManager.checkCanceled();
          if (!accessibleFileFilter.test(id) || (filter != null && !filter.containsFileId(id))) return true;
          fileIdsInner.add(id);
          return true;
        });
        return fileIdsInner;
      });

      trace.lookupResultSize(fileIds != null ? fileIds.size() : 0);

      return createLazyFileIterator(fileIds, scope);
    }
  }
@Override
  public @NotNull <K, V> Iterator<VirtualFile> getContainingFilesIterator(@NotNull ID<K, V> indexId,
                                                                          @NotNull K dataKey,
                                                                          @NotNull GlobalSearchScope scope)