Replace deprecated method setFilter to setPostFilter