List of terms
Problem
You want to search an index using a list of terms but Match
only finds exact matches.
Solution
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]]]
{
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}}]}
{
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!