Greplin/scales — pull request #4 by stefanp (2011-11-11 00:19:37+00:00)
Title: add regex support to aggregation keys

This adds support for regular expression in aggregations keys.

Use it by specifying a (name, regex) tuple as the key in an aggregator definition, ie:

```python
agg = aggregation.Aggregation({
'http_hits' : {
('ok', re.compile("[1-3][0-9][0-9]")): [aggregation.Sum(dataFormat=aggregation.DataFormats.DIRECT)],
('err', re.compile("[4-5][0-9][0-9]")): [aggregation.Sum(dataFormat = aggregation.DataFormats.DIRECT)]
}})
```

This would sum successful and failed hits separately.