code: @Override
      protected void _to(ObjectOutput out) throws IOException {
          TableAnnotationDefinition[] tads =
                  index(TableAnnotationDefinition.class, indexDefinition);
  
          // 1: write index def map size
          out.writeInt(tads.length);
  
          for (int i = 0; i < tads.length; i++) {
              // 1: write the table annotation definition
              tads[i].writeExternal(out);
              final List<Integer> documents = new ArrayList<Integer>();
              Set<Entry<Integer, Set<Integer>>> e2 =
                      entries(documentAnnotationDefinitions);
              for (Map.Entry<Integer, Set<Integer>> e : e2) {
                  if (e.getValue().contains(i)) {
                      documents.add(e.getKey());
                  }
              }
              // 2: write the number of documents
              out.writeInt(documents.size());
              for (Integer document : documents) {
                  // 1: write each documents index
                  out.writeInt(document.intValue());
              }
          }
      }
docs: {@inheritDoc}