code: private void groupFieldtoDoc(UNode                parentNode,
                                   FieldDefinition      groupFieldDef,
                                   Set<FieldDefinition> deferredFields) {
          // Prerequisities:
          assert parentNode != null;
          assert groupFieldDef != null && groupFieldDef.isGroupField();
          assert deferredFields != null && deferredFields.size() > 0;
          
          UNode groupNode = parentNode.addMapNode(groupFieldDef.getName(), "field");
          for (FieldDefinition nestedFieldDef : groupFieldDef.getNestedFields()) {
              if (!deferredFields.contains(nestedFieldDef)) {
                  continue;
              }
              if (nestedFieldDef.isGroupField()) {
                  groupFieldtoDoc(groupNode, nestedFieldDef, deferredFields);
              } else {
                  leafFieldtoDoc(groupNode, nestedFieldDef.getName());
              }
          }
      }
docs: given deferred-field map. Recurse is any child fields are also groups.