我的数据看起来像这样:
development-
minute-
USD-
1479185820-
{"foo":"bar","unix_ts":1479185820}
1479186000-
{"foo":"bar","unix_ts":1479186000}
我想查询范围,但如果结果则返回全部。另外我怎么做订单?
curl 'https://dude-3fdc.firebaseio.com/development/minute/AUD_USD.json?auth=adfadf3M3d9Za&orderBy="development/minute/USD/unix_ts"&startAt=1479229020&endAt=1479229080'
{
"error" : "Index not defined, add \".indexOn\": \"development/minute/USD/unix_ts\", for path \"/development/minute/USD\", to the rules"
根据文档,我想我必须使用索引。以下是我的默认规则。我怎么做索引?对于基于休息的查询,文档非常糟糕。
{
"rules": {
".read": "auth != null",
".write": "auth != null",
"development":{
"minute":{
"USD":{
".indexOn": ["unix_ts"]
}
}
}
}
}
或者因为它变得清晰火山底座不适合时间序列数据。因此回到mysql。