add switchQuery filter function.