Skip to content

Instantly share code, notes, and snippets.

@LuigiClaudio
Last active May 15, 2022 21:05
Show Gist options
  • Save LuigiClaudio/e23c79bcd7957880e67bcfa2a8c457e8 to your computer and use it in GitHub Desktop.
Save LuigiClaudio/e23c79bcd7957880e67bcfa2a8c457e8 to your computer and use it in GitHub Desktop.
FQL function create index reverse results timestamp
CreateIndex({
name: "colors_ref_by_user_ts_reverse",
unique: false,
serialized: true,
source: Collection("Color"),
terms: [
{
field: ["data", "owner"]
}
],
values: [
{
field: ["ts"],
reverse: true
},
{
field: ["ref"]
}
]
})
# https://docs.fauna.com/fauna/current/learn/tutorials/fql/indexes/
# https://docs.fauna.com/fauna/current/learn/tutorials/fql/indexes/sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment