Skip to content

Commit

Permalink
Adding support for regex filter (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored and xvrl committed May 20, 2016
1 parent d0763f1 commit 6cb86c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pydruid/utils/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def __init__(self, **args):
elif args["type"] == "not":
self.filter = {"filter": {"type": "not",
"field": args["field"]}}
elif args["type"] == "regex":
self.filter = {"filter": {"type": "regex",
"dimension": args["dimension"],
"pattern": args["pattern"]}}
else:
raise NotImplementedError(
'Filter type: {0} does not exist'.format(args['type']))
Expand Down

0 comments on commit 6cb86c8

Please sign in to comment.