FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date. Fauna accounts created after August 21, 2024 must use FQL v10. These accounts will not be able to run FQL v4 queries or access the v4 Dashboard. For more details, see the v4 EOL announcement and migration guide. Contact support@fauna.com with any questions. |
List of terms
Problem
You want to search an index using a list of terms but Match
only finds exact matches.
Solution
{
data: [
{
ref: Ref(Collection("spells"), "181388642046968320"),
ts: 1627085181220000,
data: {
name: 'Fire Beak',
element: [ 'air', 'fire' ],
spellbook: Ref(Collection("spellbooks"), "181388642139243008")
}
},
{
ref: Ref(Collection("spells"), "181388642071085568"),
ts: 1627085181220000,
data: {
name: "Water Dragon's Claw",
element: [ 'water', 'fire' ],
spellbook: Ref(Collection("spellbooks"), "181388642139243008")
}
},
{
ref: Ref(Collection("spells"), "181388642088911360"),
ts: 1627085181220000,
data: { name: "Hippo's Wallow", element: [ 'water', 'earth' ] }
},
{
ref: Ref(Collection("spells"), "181388642581742080"),
ts: 1627085181220000,
data: { name: "Mountain's Thunder", element: 'air', cost: 15 }
}
]
}
{'data': [{'ref': Ref(id=181388642046968320, collection=Ref(id=spells, collection=Ref(id=collections))), 'ts': 1627085181220000, 'data': {'name': 'Fire Beak', 'element': ['air', 'fire'], 'spellbook': Ref(id=181388642139243008, collection=Ref(id=spellbooks, collection=Ref(id=collections)))}}, {'ref': Ref(id=181388642071085568, collection=Ref(id=spells, collection=Ref(id=collections))), 'ts': 1627085181220000, 'data': {'name': "Water Dragon's Claw", 'element': ['water', 'fire'], 'spellbook': Ref(id=181388642139243008, collection=Ref(id=spellbooks, collection=Ref(id=collections)))}}, {'ref': Ref(id=181388642088911360, collection=Ref(id=spells, collection=Ref(id=collections))), 'ts': 1627085181220000, 'data': {'name': "Hippo's Wallow", 'element': ['water', 'earth']}}, {'ref': Ref(id=181388642581742080, collection=Ref(id=spells, collection=Ref(id=collections))), 'ts': 1627085181220000, 'data': {'name': "Mountain's Thunder", 'element': 'air', 'cost': 15}}]}
map[data:[map[data:map[element:[air fire] name:Fire Beak spellbook:{181388642139243008 0xc000116540 0xc000116540 <nil>}] ref:{181388642046968320 0xc000116360 0xc000116360 <nil>} ts:1627085181220000] map[data:map[element:[water fire] name:Water Dragon's Claw spellbook:{181388642139243008 0xc000116900 0xc000116900 <nil>}] ref:{181388642071085568 0xc000116720 0xc000116720 <nil>} ts:1627085181220000] map[data:map[element:[water earth] name:Hippo's Wallow] ref:{181388642088911360 0xc000116ae0 0xc000116ae0 <nil>} ts:1627085181220000] map[data:map[cost:15 element:air name:Mountain's Thunder] ref:{181388642581742080 0xc000116cf0 0xc000116cf0 <nil>} ts:1627085181220000]]]
ObjectV(data: Arr(ObjectV(ref: RefV(id = "181388642046968320", collection = RefV(id = "spells", collection = RefV(id = "collections"))),ts: LongV(1627085181220000),data: ObjectV(name: StringV(Fire Beak),element: Arr(StringV(air), StringV(fire)),spellbook: RefV(id = "181388642139243008", collection = RefV(id = "spellbooks", collection = RefV(id = "collections"))))), ObjectV(ref: RefV(id = "181388642071085568", collection = RefV(id = "spells", collection = RefV(id = "collections"))),ts: LongV(1627085181220000),data: ObjectV(name: StringV(Water Dragon's Claw),element: Arr(StringV(water), StringV(fire)),spellbook: RefV(id = "181388642139243008", collection = RefV(id = "spellbooks", collection = RefV(id = "collections"))))), ObjectV(ref: RefV(id = "181388642088911360", collection = RefV(id = "spells", collection = RefV(id = "collections"))),ts: LongV(1627085181220000),data: ObjectV(name: StringV(Hippo's Wallow),element: Arr(StringV(water), StringV(earth)))), ObjectV(ref: RefV(id = "181388642581742080", collection = RefV(id = "spells", collection = RefV(id = "collections"))),ts: LongV(1627085181220000),data: ObjectV(name: StringV(Mountain's Thunder),element: StringV(air),cost: LongV(15)))))
{data: [{ref: ref(id = "181388642046968320", collection = ref(id = "spells", collection = ref(id = "collections"))), ts: 1627085181220000, data: {name: "Fire Beak", element: ["air", "fire"], spellbook: ref(id = "181388642139243008", collection = ref(id = "spellbooks", collection = ref(id = "collections")))}}, {ref: ref(id = "181388642071085568", collection = ref(id = "spells", collection = ref(id = "collections"))), ts: 1627085181220000, data: {name: "Water Dragon's Claw", element: ["water", "fire"], spellbook: ref(id = "181388642139243008", collection = ref(id = "spellbooks", collection = ref(id = "collections")))}}, {ref: ref(id = "181388642088911360", collection = ref(id = "spells", collection = ref(id = "collections"))), ts: 1627085181220000, data: {name: "Hippo's Wallow", element: ["water", "earth"]}}, {ref: ref(id = "181388642581742080", collection = ref(id = "spells", collection = ref(id = "collections"))), ts: 1627085181220000, data: {name: "Mountain's Thunder", element: "air", cost: 15}}]}
{
data: [
{
ref: Ref(Collection("spells"), "181388642046968320"),
ts: 1627085181220000,
data: {
name: "Fire Beak",
element: ["air", "fire"],
spellbook: Ref(Collection("spellbooks"), "181388642139243008")
}
},
{
ref: Ref(Collection("spells"), "181388642071085568"),
ts: 1627085181220000,
data: {
name: "Water Dragon's Claw",
element: ["water", "fire"],
spellbook: Ref(Collection("spellbooks"), "181388642139243008")
}
},
{
ref: Ref(Collection("spells"), "181388642088911360"),
ts: 1627085181220000,
data: {
name: "Hippo's Wallow",
element: ["water", "earth"]
}
},
{
ref: Ref(Collection("spells"), "181388642581742080"),
ts: 1627085181220000,
data: {
name: "Mountain's Thunder",
element: "air",
cost: 15
}
}
]
}
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!