collection.index

A collection index definition that defines the index name, terms, and values field schema.

Syntax

index <indexName> {
  [terms [<term> . . .]]
  [values [<value> . . .]]
}

Name

indexName String Required

Unique index name.

Properties

Property Type Required Description

terms

String

Yes, if values is not defined.

Array of field paths. An empty array leaves the field unset. See Indexes definition for defining ascending or descending order and multivalued attribute (MVA) flag.

values

String

Yes, if terms is not defined.

A discrete value or range of values to match on. See Indexes definition for defining ascending or descending order and multivalued attribute (MVA) flag.

Examples

index MyIndex {
  terms [.a.foo, .b, mva(.c.bar)]
  values [asc(.x), desc(mva(.y)), .z]
}

See also

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!