code: @Override
      protected void _to(ObjectOutput out) throws IOException {
          TableNamespace[] tblnss = index(TableNamespace.class, indexNamespace);
          // 1: write number of table namespaces
          out.writeInt(tblnss.length);
          for (int i = 0; i < tblnss.length; i++) {
              final TableNamespace ns = tblnss[i];
              // 1: write table namespace
              ns.writeExternal(out);
              Set<Integer> documents = new HashSet<Integer>();
              for (Map.Entry<Integer, List<Integer>> entry : entries(documentNamespaces)) {
                  if (entry.getValue().contains(i)) {
                      documents.add(entry.getKey());
                  }
              }
              // 2: write number of documents
              out.writeInt(documents.size());
              for (Integer document : documents) {
                  // 1: write document index
                  out.writeInt(document.intValue());
              }
          }
      }
docs: {@inheritDoc}