Replace switch/case with if/else statement
Add Search test for Query and Filter inside HasChild filter
Add Search test for Query and Filter inside HasParent filter