Previous: , Up: Program   [Contents][Index]

7.3 Document Metadata

Document metadata are metadata that describe certain aspects of the document; they are stored adjacent to the bucket in ‘meta’ on the document root.20 They should be used in place of a bucket field any time the client has no business knowing about the data. The ‘meta’ record is called the Metabucket.

Metadata in the Metabucket should not be directly populated by external systems—Data API integration should be used instead (see below).

Metadata can be populated using any Data API (see Data API)—return data populate the Metabucket in the same way that they populate the Bucket. Definitions are stored in meta.fields, as shown in Figure 7.5.

  ["string(name)": {
    "desc": "string",
    "dapi": {
      "name": "string",
      "map": {
        "string(dest field)": "string(source field)"

Figure 7.5: Format of meta.fields.

Further, a key-value mapping of all bucket fields that—when modified, need to result in a metadata API call—are stored in the mapis object; this is shown in Figure 7.6.

  ["string(field name)"]: [ "string(dapi name)", ... ]

Figure 7.6: Format of mapis.



Terminology note: “document” and “quote” are the same thing; the latter is transitioning to the former for generality.