Last active
May 15, 2022 21:05
-
-
Save LuigiClaudio/e23c79bcd7957880e67bcfa2a8c457e8 to your computer and use it in GitHub Desktop.
FQL function create index reverse results timestamp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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