boolean remove() {
    if (!RebuildStatus.isOk(indexId) && !myIndexImpl.myIsUnitTestMode) {
      return false; // the index is scheduled for rebuild, no need to update
    }
    myIndexImpl.increaseLocalModCount();

    UpdatableIndex<?, ?, FileContent, ?> index = myIndexImpl.getIndex(indexId);

    FileBasedIndexImpl.markFileWritingIndexes(inputId);
    try {
      Supplier<Boolean> storageUpdate;
      long startTime = System.nanoTime();
      try {
        storageUpdate = index.mapInputAndPrepareUpdate(inputId, null);
      }
      catch (MapReduceIndexMappingException e) {
        BrokenIndexingDiagnostics.INSTANCE.getExceptionListener().onFileIndexMappingFailed(inputId, null, null, indexId, e);
        return false;
      }
      finally {
        this.evaluatingValueRemoverTime = System.nanoTime() - startTime;
      }

      if (myIndexImpl.runUpdateForPersistentData(storageUpdate)) {
        if (FileBasedIndexEx.doTraceStubUpdates(indexId) || FileBasedIndexEx.doTraceIndexUpdates()) {
          FileBasedIndexImpl.LOG.info("index " + indexId + " deletion finished for " + fileInfo);
        }
        ConcurrencyUtil.withLock(myIndexImpl.myReadLock, () -> {
          index.setUnindexedStateForFile(inputId);
        });
      }
      return true;
    }
    catch (RuntimeException exception) {
      myIndexImpl.requestIndexRebuildOnException(exception, indexId);
      return false;
    }
    finally {
      FileBasedIndexImpl.unmarkWritingIndexes();
    }
  }
boolean remove()