(First of all, we love firebase! Thanks for awesome service :)
Is there any way to set index for multiple keys so that we can query using multiple keys?
It looks like we can have index for 1 key, given this doc.
Eg. purchase history of EC
Imagine dataset like this:
{
$key1: {
"user_id" : 111,
"item_id" : "aaa",
"timestamp": $timestamp1
},
$key2: {
"user_id" : 222,
"item_id" : "bbb",
"timestamp": $timestamp2
}
}
Then, if we want to query by a combination of (user_id, item_id, timestamp) like this
-----
SELECT * from TABLE WHERE user_id=$user_id AND item_id=$item_id AND timestamp>=$timestamp;
-----
we usually have index (user_id, item_id, timestamp) in RDB.
Is it possible to query using multiple keys?
If yes, how can we have an index for multiple keys?