function exportDocument(callback, _field, _index_doc = 0, _index_obj = 0) {

    if (_index_doc < this.field.length) {
        const field = this.field[_index_doc],
              idx = this.index.get(field),
              res = idx.export(callback, field, _index_doc, _index_obj = 1);


        if (res && res.then) {
            const self = this;
            return res.then(function () {
                return self.export(callback, field, _index_doc + 1);
            });
        }

        return this.export(callback, field, _index_doc + 1);
    } else {

        let key, chunk;

        switch (_index_obj) {

            case 0:

                key = "reg";
                chunk = reg_to_json(this.reg);
                _field = null;
                break;

            case 1:

                key = "tag";
                chunk = this.tag && ctx_to_json(this.tag, this.reg.size);
                _field = null;
                break;

            case 2:

                key = "doc";
                chunk = this.store && map_to_json(
                /** @type {Map<IntermediateSearchResults>} */this.store);
                _field = null;
                break;

            default:

                return;
        }

        return save.call(this, callback, _field, key,
        /** @type {Array|null} */chunk || null, _index_doc, _index_obj);
    }
}
@param {function(string,string):Promise|void} callback
@param {string|null=} _field
@param {number=} _index_doc
@param {number=} _index_obj
@this {Document}