I am storing time series data (machine monitoring data) with MongoDB. The data model looks like the following,which is inspired by the internet article "MongoDB as a Time Series Database"
Code:
{
  timestamp_hour: ISODate("2013-10-10T23:00:00.000Z"),
  type: “Voltage”,
  values: {
    0: { 0: 1.2343, 1: 1.2343, …, 59: 1.2343},
    1: { 0: 1.2343, 1: 1.2343, …, 59: 1.2343},
    …,
    22: { 0: 1.2343, 1: 1.2343, …, 59: 1.2343},
    23: { 0: 1.2343, 1: 1.2343, …, 59: 1.2343}
  }
}
In this manner, monitoring data is bucketed by time period.
To support queries on time range and voltage value, e.g., searching records that falling time range from 2011-10-21 00:00:00 to 2011-10-31 23:59:59, and voltage value larger than 32V, I need to create index on value. However, "values" is a nested field. I am wondering how to create index on this kind of value.