/**
   * Starts processing of every file provided by IngestManager. Checks if it is time to commit and
   * run search
   *
   * @param abstractFile file/unallocated file/directory to process
   * @return ProcessResult.OK in most cases and ERROR only if error in the pipeline, otherwise does
   *     not advice to stop the pipeline
   */
  @Override
  public ProcessResult process(AbstractFile abstractFile) {

    if (initialized == false) // error initializing indexing/Solr
    {
      return ProcessResult.OK;
    }

    // check if we should skip this file according to HashDb service
    // if so do not index it, also postpone indexing and keyword search threads to later
    IngestServiceAbstractFile.ProcessResult hashDBResult =
        managerProxy.getAbstractFileServiceResult(hashDBServiceName);
    // logger.log(Level.INFO, "hashdb result: " + hashDBResult + "file: " + AbstractFile.getName());
    if (hashDBResult == IngestServiceAbstractFile.ProcessResult.COND_STOP && skipKnown) {
      return ProcessResult.OK;
    } else if (hashDBResult == IngestServiceAbstractFile.ProcessResult.ERROR) {
      // notify depending service that keyword search (would) encountered error for this file
      return ProcessResult.ERROR;
    }

    if (processedFiles == false) {
      processedFiles = true;
    }

    checkRunCommitSearch();

    indexer.indexFile(abstractFile);
    return ProcessResult.OK;
  }