code: private IteratorType figureOutIteratorType(String query,
                                                 String terms,
                                                 String pidfileParm) {
          int howMany =
                  (query == null ? 0 : 1) + (terms == null ? 0 : 1)
                          + (pidfileParm == null ? 0 : 1);
          if (howMany == 0) {
              throw new ValidatorProcessUsageException("You must provide "
                      + "either '" + PARAMETER_QUERY + "', '" + PARAMETER_TERMS
                      + "' or '" + PARAMETER_PIDFILE + "'.");
          }
          if (howMany > 1) {
              throw new ValidatorProcessUsageException("You must provide only "
                      + "one of these parameters: '" + PARAMETER_QUERY + "', '"
                      + PARAMETER_TERMS + "' or '" + PARAMETER_PIDFILE + "'.");
          }
  
          return pidfileParm == null ? IteratorType.FS_QUERY
                  : IteratorType.PIDFILE;
      }
docs: Look at the parameters. Is this a query-based request or a pidfile-based
  request? If we put in too many parms, or not enough, that's a problem.