code: public final void updateKey(String key) throws IOException {
      Objects.requireNonNull(key, "old key required");
      if (index.containsKey(key)) {
        MtasSolrStatus status = index.get(key);
        index.remove(key);
        if (!index.containsKey(status.key())) {
          index.put(status.key(), status);
        } else {
          throw new IOException("key already exists");
        }
      }
    }
docs: Update key.
  
  @param key
  the key
  @throws IOException
  Signals that an I/O exception has occurred.