Get an index document

Problem

You need to retrieve the document that describes an index from the current database.

Solution

Use the Get function:

Copied!
(("all_people"))
{
  ref: ("all_people"),
  ts: 1631835750270000,
  active: true,
  serialized: true,
  name: 'all_people',
  source: ("People"),
  values: [
    { field: [ 'data', 'first' ] },
    { field: [ 'data', 'last' ] },
    { field: [ 'ref' ] }
  ],
  partitions: 8
}
Query metrics:
  •    bytesIn:   30

  •   bytesOut:  336

  • computeOps:    1

  •    readOps:    1

  •   writeOps:    0

  •  readBytes:  169

  • writeBytes:    0

  •  queryTime: 88ms

  •    retries:    0

More information

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!