keys.put(JSONObject.NULL); // always include un-indexed intervals
for(Integer clusterId : clusterIds){
keys.put(clusterId.intValue());
}
CouchQuery query = new CouchQuery();
query.setViewName("date-index");
query.setIncludeDocs(false);
query.setReduce(false);
query.setKeys(keys);
CouchQueryResults queryResults = atlasDesignDocument.performQuery(query);
results.documentWithIntervals = new ArrayList<DocumentWithInterval>(queryResults.getRows().size());
for(JSONObject row : queryResults.getRows()){
String docId = row.optString("id");