docs: public void writeToIndex(Object object) {
          Assert.notNull(object, "no object data given");
  
          lazyInitWriting();
          BytesRef serialized = bulkEntryWriter.writeBulkEntry(object);
          if (serialized != null) {
              doWriteToIndex(serialized);
          }
      }