Added support for filter queries

No breaking API changes. Just added functionality.